r300542 - Fix one more 'not all control paths return a value' MSVC warning
Alex Lorenz via cfe-commits
cfe-commits at lists.llvm.org
Tue Apr 18 03:17:41 PDT 2017
Author: arphaman
Date: Tue Apr 18 05:17:41 2017
New Revision: 300542
URL: http://llvm.org/viewvc/llvm-project?rev=300542&view=rev
Log:
Fix one more 'not all control paths return a value' MSVC warning
The warning was caused by r300539.
Modified:
cfe/trunk/lib/Parse/ParsePragma.cpp
cfe/trunk/utils/TableGen/ClangAttrEmitter.cpp
Modified: cfe/trunk/lib/Parse/ParsePragma.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Parse/ParsePragma.cpp?rev=300542&r1=300541&r2=300542&view=diff
==============================================================================
--- cfe/trunk/lib/Parse/ParsePragma.cpp (original)
+++ cfe/trunk/lib/Parse/ParsePragma.cpp Tue Apr 18 05:17:41 2017
@@ -1014,6 +1014,8 @@ static bool isAbstractAttrMatcherRule(at
return IsAbstract;
#include "clang/Basic/AttrSubMatchRulesList.inc"
}
+ llvm_unreachable("Invalid attribute subject match rule");
+ return false;
}
static void diagnoseExpectedAttributeSubjectSubRule(
Modified: cfe/trunk/utils/TableGen/ClangAttrEmitter.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/utils/TableGen/ClangAttrEmitter.cpp?rev=300542&r1=300541&r2=300542&view=diff
==============================================================================
--- cfe/trunk/utils/TableGen/ClangAttrEmitter.cpp (original)
+++ cfe/trunk/utils/TableGen/ClangAttrEmitter.cpp Tue Apr 18 05:17:41 2017
@@ -3168,7 +3168,7 @@ emitAttributeMatchRules(PragmaClangAttri
OS << ";\n";
}
OS << " }\n";
- OS << " llvm_unreachable(\"Invalid match rule\");\n";
+ OS << " llvm_unreachable(\"Invalid match rule\");\nreturn false;\n";
OS << "}\n\n";
}
More information about the cfe-commits
mailing list