summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorAaron Ballman <aaron@aaronballman.com>2014-05-20 14:10:53 +0000
committerAaron Ballman <aaron@aaronballman.com>2014-05-20 14:10:53 +0000
commit8a04753c6cdec5c45f84d38eaf33f9b6121b7d14 (patch)
tree9ba793d942261c192b1a39136d70fba42cae5073 /utils
parentb46eb10258c61d1253c6bdf64836ebbb73877d19 (diff)
downloadclang-8a04753c6cdec5c45f84d38eaf33f9b6121b7d14.tar.gz
clang-8a04753c6cdec5c45f84d38eaf33f9b6121b7d14.tar.bz2
clang-8a04753c6cdec5c45f84d38eaf33f9b6121b7d14.tar.xz
None of these attributes require FunctionTemplate to be explicitly listed as part of their subject definition. FunctionTemplateDecls are not what the attribute appertains to in the first place -- it attaches to the underlying FunctionDecl.
The attribute emitter was using FunctionTemplate to map the diagnostic to "functions or methods", but that isn't a particularly clear diagnostic in these cases anyway (since they do not apply to ObjC methods). Updated the attribute emitter to remove custom logic for FunctionTemplateDecl, and updated the test cases for the change in diagnostic wording. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@209209 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils')
-rw-r--r--utils/TableGen/ClangAttrEmitter.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/utils/TableGen/ClangAttrEmitter.cpp b/utils/TableGen/ClangAttrEmitter.cpp
index 6aca97ac74..f4c9237a50 100644
--- a/utils/TableGen/ClangAttrEmitter.cpp
+++ b/utils/TableGen/ClangAttrEmitter.cpp
@@ -2047,10 +2047,9 @@ static std::string CalculateDiagnostic(const Record &S) {
ObjCInterface = 1U << 9,
Block = 1U << 10,
Namespace = 1U << 11,
- FuncTemplate = 1U << 12,
- Field = 1U << 13,
- CXXMethod = 1U << 14,
- ObjCProtocol = 1U << 15
+ Field = 1U << 12,
+ CXXMethod = 1U << 13,
+ ObjCProtocol = 1U << 14
};
uint32_t SubMask = 0;
@@ -2082,7 +2081,6 @@ static std::string CalculateDiagnostic(const Record &S) {
.Case("Block", Block)
.Case("CXXRecord", Class)
.Case("Namespace", Namespace)
- .Case("FunctionTemplate", FuncTemplate)
.Case("Field", Field)
.Case("CXXMethod", CXXMethod)
.Default(0);
@@ -2121,7 +2119,6 @@ static std::string CalculateDiagnostic(const Record &S) {
case Func | ObjCMethod | Class: return "ExpectedFunctionMethodOrClass";
case Func | Param:
case Func | ObjCMethod | Param: return "ExpectedFunctionMethodOrParameter";
- case Func | FuncTemplate:
case Func | ObjCMethod: return "ExpectedFunctionOrMethod";
case Func | Var: return "ExpectedVariableOrFunction";