diff options
author | Aaron Ballman <aaron@aaronballman.com> | 2016-09-15 14:12:33 +0000 |
---|---|---|
committer | Aaron Ballman <aaron@aaronballman.com> | 2016-09-15 14:12:33 +0000 |
commit | bc2bbb2e29e0a11aaeedadbf796035a8c0b707e4 (patch) | |
tree | 0f47152c64d04da5da27eb860c10aae852541061 /clang/lib/Sema/SemaChecking.cpp | |
parent | aaabbbf8863827cb9e286e1e04cc41f088f9383f (diff) | |
download | llvm-bc2bbb2e29e0a11aaeedadbf796035a8c0b707e4.zip llvm-bc2bbb2e29e0a11aaeedadbf796035a8c0b707e4.tar.gz llvm-bc2bbb2e29e0a11aaeedadbf796035a8c0b707e4.tar.bz2 |
Reverting r281609; it caused some build bots to break.
http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-ubuntu-fast/builds/20061/steps/test/logs/stdio
llvm-svn: 281612
Diffstat (limited to 'clang/lib/Sema/SemaChecking.cpp')
-rw-r--r-- | clang/lib/Sema/SemaChecking.cpp | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/clang/lib/Sema/SemaChecking.cpp b/clang/lib/Sema/SemaChecking.cpp index f3f204f..81dc237 100644 --- a/clang/lib/Sema/SemaChecking.cpp +++ b/clang/lib/Sema/SemaChecking.cpp @@ -3240,17 +3240,8 @@ bool Sema::SemaBuiltinVAStartImpl(CallExpr *TheCall) { Diag(TheCall->getArg(1)->getLocStart(), diag::warn_second_arg_of_va_start_not_last_named_param); else if (IsCRegister || Type->isReferenceType() || - Type->isSpecificBuiltinType(BuiltinType::Float) || [=] { - // Promotable integers are UB, but enumerations need a bit of - // extra checking to see what their promotable type actually is. - if (!Type->isPromotableIntegerType()) - return false; - if (!Type->isEnumeralType()) - return true; - const EnumDecl *ED = Type->getAs<EnumType>()->getDecl(); - return !(ED && - Context.typesAreCompatible(ED->getPromotionType(), Type)); - }()) { + Type->isPromotableIntegerType() || + Type->isSpecificBuiltinType(BuiltinType::Float)) { unsigned Reason = 0; if (Type->isReferenceType()) Reason = 1; else if (IsCRegister) Reason = 2; |