r338893 - revert r338831 - Fix unused variable warning in tablegen generated code
Erich Keane via cfe-commits
cfe-commits at lists.llvm.org
Fri Aug 3 07:24:34 PDT 2018
Author: erichkeane
Date: Fri Aug 3 07:24:34 2018
New Revision: 338893
URL: http://llvm.org/viewvc/llvm-project?rev=338893&view=rev
Log:
revert r338831 - Fix unused variable warning in tablegen generated code
No longer necessary thanks to r338889 (and friends).
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=338893&r1=338892&r2=338893&view=diff
==============================================================================
--- cfe/trunk/utils/TableGen/ClangAttrEmitter.cpp (original)
+++ cfe/trunk/utils/TableGen/ClangAttrEmitter.cpp Fri Aug 3 07:24:34 2018
@@ -3274,15 +3274,11 @@ static std::string GenerateCustomApperta
return "";
}
- const StringRef CheckCodeValue = Subject.getValueAsString("CheckCode");
-
OS << "static bool " << FnName << "(const Decl *D) {\n";
- if (CheckCodeValue != "false") {
- OS << " if (const auto *S = dyn_cast<";
- OS << GetSubjectWithSuffix(Base);
- OS << ">(D))\n";
- OS << " return " << Subject.getValueAsString("CheckCode") << ";\n";
- }
+ OS << " if (const auto *S = dyn_cast<";
+ OS << GetSubjectWithSuffix(Base);
+ OS << ">(D))\n";
+ OS << " return " << Subject.getValueAsString("CheckCode") << ";\n";
OS << " return false;\n";
OS << "}\n\n";
More information about the cfe-commits
mailing list