зеркало из https://github.com/microsoft/clang.git
PR7724: Don't try to evaluate value-dependent expressions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109532 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Родитель
60a5257578
Коммит
787b094695
|
@ -5815,7 +5815,7 @@ inline QualType Sema::CheckLogicalOperands( // C99 6.5.[13,14]
|
|||
// bitwise one. We do this when the LHS is a non-bool integer and the RHS
|
||||
// is a constant.
|
||||
if (lex->getType()->isIntegerType() && !lex->getType()->isBooleanType() &&
|
||||
rex->getType()->isIntegerType() &&
|
||||
rex->getType()->isIntegerType() && !rex->isValueDependent() &&
|
||||
// Don't warn in macros.
|
||||
!Loc.isMacroID()) {
|
||||
// If the RHS can be constant folded, and if it constant folds to something
|
||||
|
|
|
@ -40,3 +40,8 @@ namespace PR7198 {
|
|||
}
|
||||
};
|
||||
}
|
||||
|
||||
namespace PR7724 {
|
||||
template<typename OT> int myMethod()
|
||||
{ return 2 && sizeof(OT); }
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче