forked from OSchip/llvm-project
Always build a builtin operator expression for the __extension__ unary operator.
llvm-svn: 88811
This commit is contained in:
parent
50cb321fdc
commit
461a2c0640
|
@ -5711,7 +5711,8 @@ Action::OwningExprResult Sema::BuildUnaryOp(Scope *S, SourceLocation OpLoc,
|
|||
UnaryOperator::Opcode Opc,
|
||||
ExprArg input) {
|
||||
Expr *Input = (Expr*)input.get();
|
||||
if (getLangOptions().CPlusPlus && Input->getType()->isOverloadableType()) {
|
||||
if (getLangOptions().CPlusPlus && Input->getType()->isOverloadableType() &&
|
||||
Opc != UnaryOperator::Extension) {
|
||||
// Find all of the overloaded operators visible from this
|
||||
// point. We perform both an operator-name lookup from the local
|
||||
// scope and an argument-dependent lookup based on the types of
|
||||
|
|
|
@ -185,3 +185,6 @@ int test_pr5432() {
|
|||
return a[X][X];
|
||||
}
|
||||
|
||||
void f() {
|
||||
(void)__extension__(A());
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue