From 78884d1850ed89852fee2dd85c182c52b0e71a73 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@220297 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/clang/Basic/Attr.td | 2 +- test/SemaCXX/attr-nodebug.cpp | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/include/clang/Basic/Attr.td b/include/clang/Basic/Attr.td index cc9629334c..012988b932 100644 --- a/include/clang/Basic/Attr.td +++ b/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/test/SemaCXX/attr-nodebug.cpp b/test/SemaCXX/attr-nodebug.cpp index b441da21f8..fd35722f62 100644 --- a/test/SemaCXX/attr-nodebug.cpp +++ b/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.40.0