summaryrefslogtreecommitdiffstats
path: root/clang/test/Parser/cxx11-stmt-attributes.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2013-11-15 21:10:54 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2013-11-15 21:10:54 +0000
commitca9b0b6863fcb5bc14f107b34fc90cb058a53c15 (patch)
tree96d27366055038c678650673c35dceb3e9740a6e /clang/test/Parser/cxx11-stmt-attributes.cpp
parent33c7b4a8b34cde1c1667ed3877cf46d6f1fbc49b (diff)
downloadbcm5719-llvm-ca9b0b6863fcb5bc14f107b34fc90cb058a53c15.tar.gz
bcm5719-llvm-ca9b0b6863fcb5bc14f107b34fc90cb058a53c15.zip
Diagnose C++11 attributes before fp_contract pragmas.
llvm-svn: 194850
Diffstat (limited to 'clang/test/Parser/cxx11-stmt-attributes.cpp')
-rw-r--r--clang/test/Parser/cxx11-stmt-attributes.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/clang/test/Parser/cxx11-stmt-attributes.cpp b/clang/test/Parser/cxx11-stmt-attributes.cpp
index 2f727a25bd7..9374b58b1f2 100644
--- a/clang/test/Parser/cxx11-stmt-attributes.cpp
+++ b/clang/test/Parser/cxx11-stmt-attributes.cpp
@@ -76,4 +76,9 @@ void foo(int i) {
}
[[carries_dependency]] return; // expected-error {{'carries_dependency' attribute cannot be applied to a statement}}
+
+ {
+ [[ ]] // expected-error {{an attribute list cannot appear here}}
+#pragma STDC FP_CONTRACT ON // expected-error {{can only appear at file scope or at the start of a compound statement}}
+ }
}
OpenPOWER on IntegriCloud