From 953e985ed02617ee01b32c77ce4ac8b3bc21fb81 Mon Sep 17 00:00:00 2001 From: Aaron Ballman Date: Tue, 21 Oct 2014 15:46:57 +0000 Subject: [PATCH] The nodebug attribute has a C++11-style spelling supported by GCC as well. This modifies it so we support that spelling as well. llvm-svn: 220297 --- clang/include/clang/Basic/Attr.td | 2 +- clang/test/SemaCXX/attr-nodebug.cpp | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/clang/include/clang/Basic/Attr.td b/clang/include/clang/Basic/Attr.td index cc96293..012988b 100644 --- a/clang/include/clang/Basic/Attr.td +++ b/clang/include/clang/Basic/Attr.td @@ -835,7 +835,7 @@ def NoCommon : InheritableAttr { } def NoDebug : InheritableAttr { - let Spellings = [GNU<"nodebug">]; + let Spellings = [GCC<"nodebug">]; let Documentation = [Undocumented]; } diff --git a/clang/test/SemaCXX/attr-nodebug.cpp b/clang/test/SemaCXX/attr-nodebug.cpp index b441da2..fd35722 100644 --- a/clang/test/SemaCXX/attr-nodebug.cpp +++ b/clang/test/SemaCXX/attr-nodebug.cpp @@ -1,7 +1,9 @@ -// RUN: %clang_cc1 %s -verify -fsyntax-only +// RUN: %clang_cc1 %s -std=c++11 -verify -fsyntax-only // Note: most of the 'nodebug' tests are in attr-nodebug.c. // expected-no-diagnostics class c { void t3() __attribute__((nodebug)); }; + +[[gnu::nodebug]] void f() {} -- 2.7.4