r371876 - Fix build error in 371875

Erich Keane via cfe-commits cfe-commits at lists.llvm.org
Fri Sep 13 10:56:38 PDT 2019


Author: erichkeane
Date: Fri Sep 13 10:56:38 2019
New Revision: 371876

URL: http://llvm.org/viewvc/llvm-project?rev=371876&view=rev
Log:
Fix build error in 371875

Apparently Clang complains about the name hiding here in a way that my
GCC build does not, so a shocking number of buildbots decided to tell me
about it.  Change the name of the variable to prevent the name hiding
and hope we don't have to fix this again.

Modified:
    cfe/trunk/utils/TableGen/ClangAttrEmitter.cpp

Modified: cfe/trunk/utils/TableGen/ClangAttrEmitter.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/utils/TableGen/ClangAttrEmitter.cpp?rev=371876&r1=371875&r2=371876&view=diff
==============================================================================
--- cfe/trunk/utils/TableGen/ClangAttrEmitter.cpp (original)
+++ cfe/trunk/utils/TableGen/ClangAttrEmitter.cpp Fri Sep 13 10:56:38 2019
@@ -2341,7 +2341,7 @@ void EmitClangAttrClass(RecordKeeper &Re
       OS << ", SourceRange Range, AttributeCommonInfo::Syntax Syntax";
       if (!ElideSpelling)
         OS << ", " << R.getName()
-           << "Attr::Spelling Spelling = "
+           << "Attr::Spelling S = "
               "static_cast<Spelling>(SpellingNotCalculated)";
       OS << ") {\n";
       OS << "    AttributeCommonInfo I(Range, ";
@@ -2353,7 +2353,7 @@ void EmitClangAttrClass(RecordKeeper &Re
 
       OS << ", Syntax";
       if (!ElideSpelling)
-        OS << ", Spelling";
+        OS << ", S";
       OS << ");\n";
       OS << "    return Create";
       if (Implicit)




More information about the cfe-commits mailing list