diff --git a/clang/include/clang/Basic/Attr.td b/clang/include/clang/Basic/Attr.td index 82b991ac85fb..31435485ef79 100644 --- a/clang/include/clang/Basic/Attr.td +++ b/clang/include/clang/Basic/Attr.td @@ -529,7 +529,7 @@ def Destructor : InheritableAttr { def EnableIf : InheritableAttr { let Spellings = [GNU<"enable_if">]; - let Subjects = SubjectList<[Function]>; + let Subjects = SubjectList<[FunctionDefinition]>; let Args = [ExprArgument<"Cond">, StringArgument<"Message">]; let TemplateDependent = 1; } @@ -825,7 +825,7 @@ def ObjCDesignatedInitializer : Attr { def Overloadable : Attr { let Spellings = [GNU<"overloadable">]; - let Subjects = SubjectList<[Function], ErrorDiag>; + let Subjects = SubjectList<[FunctionDefinition], ErrorDiag>; } def Override : InheritableAttr { diff --git a/clang/test/Sema/enable_if.c b/clang/test/Sema/enable_if.c index 48ff25093135..a3c4323c4c98 100644 --- a/clang/test/Sema/enable_if.c +++ b/clang/test/Sema/enable_if.c @@ -1,5 +1,5 @@ -// RUN: %clang_cc1 %s -verify -Wno-gcc-compat -// RUN: %clang_cc1 %s -DCODEGEN -emit-llvm -o - -Wno-gcc-compat | FileCheck %s +// RUN: %clang_cc1 %s -verify +// RUN: %clang_cc1 %s -DCODEGEN -emit-llvm -o - | FileCheck %s #define O_CREAT 0x100 typedef int mode_t; diff --git a/clang/test/SemaCXX/enable_if.cpp b/clang/test/SemaCXX/enable_if.cpp index b52f86ea3c08..c1cdefeb4cef 100644 --- a/clang/test/SemaCXX/enable_if.cpp +++ b/clang/test/SemaCXX/enable_if.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -std=c++11 -verify -Wno-gcc-compat %s +// RUN: %clang_cc1 -std=c++11 -verify %s typedef int (*fp)(int); int surrogate(int);