これは、次を使用するとコンパイルされますclang -std=gnu++11 -c test.cpp
。
void test() {
[[random text here]]
if (0) {
}
}
しかし、これはエラーになりますmain.cpp:3:1: error: expected statement
:
void test() {
[[random text here]]
}
コンパイルしclang -std=gnu++11 -S -emit-llvm main.cpp
て LLVM コードを見ると、次の[[...]]
行は効果がないように見えます。
define void @_Z5testv() nounwind uwtable ssp {
ret void
}
理由はありますか?バグまたは一部の C++11 構文または GNU 拡張構文?
Xcode 4.4.1 (Apple clang バージョン 4.0 (tags/Apple/clang-421.0.60) (LLVM 3.1svn に基づく)) の clang を使用しています。