Do not warn about left paren not separated by a space
Since commit 58e52416
(Warn about arguments not separated by whitespace,
2013-02-16) we warn about arguments not separated by spaces. Loosen the
warning to not complain about left parens not separated by spaces from
the preceding token. This is common in code like "if(NOT(X))".
Teach the RunCMake.Syntax test to cover cases of left parens not
separated by spaces and check that no warning appears.
This commit is contained in:
parent
c50f7ede20
commit
9040ec9117
|
@ -287,8 +287,8 @@ bool cmListFileParser::ParseFunction(const char* name, long line)
|
|||
if(token->type == cmListFileLexer_Token_ParenLeft)
|
||||
{
|
||||
parenDepth++;
|
||||
this->AddArgument(token, cmListFileArgument::Unquoted);
|
||||
this->Separation = SeparationOkay;
|
||||
this->AddArgument(token, cmListFileArgument::Unquoted);
|
||||
}
|
||||
else if(token->type == cmListFileLexer_Token_ParenRight)
|
||||
{
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
^$
|
|
@ -0,0 +1,2 @@
|
|||
-- unquoted\(unquoted\)
|
||||
-- quoted\(quoted\)
|
|
@ -0,0 +1,2 @@
|
|||
message(STATUS unquoted(unquoted))
|
||||
message(STATUS "quoted"("quoted"))
|
|
@ -11,6 +11,7 @@ run_cmake(String1)
|
|||
run_cmake(StringNoSpace)
|
||||
run_cmake(Unquoted0)
|
||||
run_cmake(Unquoted1)
|
||||
run_cmake(ParenNoSpace)
|
||||
run_cmake(UnterminatedCall1)
|
||||
run_cmake(UnterminatedCall2)
|
||||
run_cmake(UnterminatedString)
|
||||
|
|
Loading…
Reference in New Issue