summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema
diff options
context:
space:
mode:
authorEli Friedman <eli.friedman@gmail.com>2012-01-10 04:58:17 +0000
committerEli Friedman <eli.friedman@gmail.com>2012-01-10 04:58:17 +0000
commitc4b251dc2bc66f753f279fa904da6861093ae1e6 (patch)
tree9f2c246ca837406d87743ff79548d746bc3c4342 /clang/lib/Sema
parent1bc5c2c7efe8652f5b0599d52ad5fa2b563dfc28 (diff)
downloadbcm5719-llvm-c4b251dc2bc66f753f279fa904da6861093ae1e6.tar.gz
bcm5719-llvm-c4b251dc2bc66f753f279fa904da6861093ae1e6.zip
Implement the missing pieces of Evaluate for _Complex types. With that complete, remove some code from CGExprConstant which is no longer necessary. While I'm here, a couple minor tweaks to _Complex-in-C++. (Specifically, make _Complex types literal types, and don't warn for _Complex int.)
llvm-svn: 147840
Diffstat (limited to 'clang/lib/Sema')
-rw-r--r--clang/lib/Sema/DeclSpec.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/Sema/DeclSpec.cpp b/clang/lib/Sema/DeclSpec.cpp
index 2fb4f35cd81..2b5efc692f4 100644
--- a/clang/lib/Sema/DeclSpec.cpp
+++ b/clang/lib/Sema/DeclSpec.cpp
@@ -867,7 +867,8 @@ void DeclSpec::Finish(DiagnosticsEngine &D, Preprocessor &PP) {
TypeSpecType = TST_double; // _Complex -> _Complex double.
} else if (TypeSpecType == TST_int || TypeSpecType == TST_char) {
// Note that this intentionally doesn't include _Complex _Bool.
- Diag(D, TSTLoc, diag::ext_integer_complex);
+ if (!PP.getLangOptions().CPlusPlus)
+ Diag(D, TSTLoc, diag::ext_integer_complex);
} else if (TypeSpecType != TST_float && TypeSpecType != TST_double) {
Diag(D, TSCLoc, diag::err_invalid_complex_spec)
<< getSpecifierName((TST)TypeSpecType);
OpenPOWER on IntegriCloud