diff options
author | Brad King <brad.king@kitware.com> | 2020-09-25 14:12:20 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2020-09-28 13:49:08 (GMT) |
commit | 727ed0c403ad87c5cae84222d7d69b95b665b63f (patch) | |
tree | d932b888f9e3196d956ffc62e7fb77b6a09030ea /Source/cmFunctionCommand.cxx | |
parent | e456dae6693dc3a79e2708481a969b43cda188cf (diff) | |
download | CMake-727ed0c403ad87c5cae84222d7d69b95b665b63f.zip CMake-727ed0c403ad87c5cae84222d7d69b95b665b63f.tar.gz CMake-727ed0c403ad87c5cae84222d7d69b95b665b63f.tar.bz2 |
cmMakefile: Simplify ExpandArguments signature
The only call sites that pass the explicit file name argument are in
function blocker `ArgumentsMatch` methods for `function` and `macro`.
We already ensure that they are balanced within a file scope, and the
RAII helpers `BuildsystemFileScope` and `ListFileScope` ensure that the
backtrace and execution list file stacks unwind to the matching level.
Therefore we can assume that the file name where we are checking for
matching arguments matches starting file name where those arguments
first appeared, and do not need to pass it explicitly.
Diffstat (limited to 'Source/cmFunctionCommand.cxx')
-rw-r--r-- | Source/cmFunctionCommand.cxx | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/Source/cmFunctionCommand.cxx b/Source/cmFunctionCommand.cxx index b6f58bd..46bd057 100644 --- a/Source/cmFunctionCommand.cxx +++ b/Source/cmFunctionCommand.cxx @@ -147,8 +147,7 @@ bool cmFunctionFunctionBlocker::ArgumentsMatch(cmListFileFunction const& lff, cmMakefile& mf) const { std::vector<std::string> expandedArguments; - mf.ExpandArguments(lff.Arguments, expandedArguments, - this->GetStartingContext().FilePath.c_str()); + mf.ExpandArguments(lff.Arguments, expandedArguments); return expandedArguments.empty() || expandedArguments.front() == this->Args.front(); } |