diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2008-10-17 23:23:35 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2008-10-17 23:23:35 +0000 |
commit | 3a0558af9aae977aad11a5b74ce77b8b3c2e057d (patch) | |
tree | 51ec671b40677d2dbcf2eec7634c5f3aea2d10cb | |
parent | 1ea1aa2cc1c8402b4b5675582a259d75f416edc8 (diff) | |
download | bcm5719-llvm-3a0558af9aae977aad11a5b74ce77b8b3c2e057d.tar.gz bcm5719-llvm-3a0558af9aae977aad11a5b74ce77b8b3c2e057d.zip |
Just do a diagIfAmbiguous -> warnIfAmbiguous rename.
No functionality change.
llvm-svn: 57746
-rw-r--r-- | clang/include/clang/Parse/Parser.h | 4 | ||||
-rw-r--r-- | clang/lib/Parse/ParseDecl.cpp | 4 | ||||
-rw-r--r-- | clang/lib/Parse/ParseTentative.cpp | 6 |
3 files changed, 7 insertions, 7 deletions
diff --git a/clang/include/clang/Parse/Parser.h b/clang/include/clang/Parse/Parser.h index de12549d7f0..8c673b50da2 100644 --- a/clang/include/clang/Parse/Parser.h +++ b/clang/include/clang/Parse/Parser.h @@ -615,11 +615,11 @@ private: /// isCXXFunctionDeclarator - Disambiguates between a function declarator or /// a constructor-style initializer, when parsing declaration statements. /// Returns true for function declarator and false for constructor-style - /// initializer. If 'diagIfAmbiguous' is true a warning will be emitted to + /// initializer. If 'warnIfAmbiguous' is true a warning will be emitted to /// indicate that the parens were disambiguated as function declarator. /// If during the disambiguation process a parsing error is encountered, /// the function returns true to let the declaration parsing code handle it. - bool isCXXFunctionDeclarator(bool diagIfAmbiguous); + bool isCXXFunctionDeclarator(bool warnIfAmbiguous); /// isCXXConditionDeclaration - Disambiguates between a declaration or an /// expression for a condition of a if/switch/while/for statement. diff --git a/clang/lib/Parse/ParseDecl.cpp b/clang/lib/Parse/ParseDecl.cpp index 142347687e2..7e83c5b014f 100644 --- a/clang/lib/Parse/ParseDecl.cpp +++ b/clang/lib/Parse/ParseDecl.cpp @@ -1228,12 +1228,12 @@ void Parser::ParseDirectDeclarator(Declarator &D) { if (Tok.is(tok::l_paren)) { // When not in file scope, warn for ambiguous function declarators, just // in case the author intended it as a variable definition. - bool diagIfAmbiguous = D.getContext() != Declarator::FileContext; + bool warnIfAmbiguous = D.getContext() != Declarator::FileContext; // The paren may be part of a C++ direct initializer, eg. "int x(1);". // In such a case, check if we actually have a function declarator; if it // is not, the declarator has been fully parsed. if (getLang().CPlusPlus && D.mayBeFollowedByCXXDirectInit() && - !isCXXFunctionDeclarator(diagIfAmbiguous)) + !isCXXFunctionDeclarator(warnIfAmbiguous)) break; ParseFunctionDeclarator(ConsumeParen(), D); } else if (Tok.is(tok::l_square)) { diff --git a/clang/lib/Parse/ParseTentative.cpp b/clang/lib/Parse/ParseTentative.cpp index 1666e39ee1a..3e7aeb8f1da 100644 --- a/clang/lib/Parse/ParseTentative.cpp +++ b/clang/lib/Parse/ParseTentative.cpp @@ -453,7 +453,7 @@ Parser::TPResult Parser::TryParseDeclarator(bool mayBeAbstract, // initializer that follows the declarator. Note that ctor-style // initializers are not possible in contexts where abstract declarators // are allowed. - if (!mayBeAbstract && !isCXXFunctionDeclarator(false/*diagIfAmbiguous*/)) + if (!mayBeAbstract && !isCXXFunctionDeclarator(false/*warnIfAmbiguous*/)) break; // direct-declarator '(' parameter-declaration-clause ')' @@ -722,7 +722,7 @@ Parser::TPResult Parser::TryParseDeclarationSpecifier() { /// '(' parameter-declaration-clause ')' cv-qualifier-seq[opt] /// exception-specification[opt] /// -bool Parser::isCXXFunctionDeclarator(bool diagIfAmbiguous) { +bool Parser::isCXXFunctionDeclarator(bool warnIfAmbiguous) { // C++ 8.2p1: // The ambiguity arising from the similarity between a function-style cast and @@ -750,7 +750,7 @@ bool Parser::isCXXFunctionDeclarator(bool diagIfAmbiguous) { if (TPR == TPResult::Ambiguous()) { // Function declarator has precedence over constructor-style initializer. // Emit a warning just in case the author intended a variable definition. - if (diagIfAmbiguous) + if (warnIfAmbiguous) Diag(Tok.getLocation(), diag::warn_parens_disambiguated_as_function_decl, SourceRange(Tok.getLocation(), TPLoc)); return true; |