}
break;
+ case CALL_EXPR:
+ if (tree fndecl = cp_get_callee_fndecl_nofold (stmt))
+ if (DECL_IMMEDIATE_FUNCTION_P (fndecl)
+ && source_location_current_p (fndecl))
+ *stmt_p = stmt = cxx_constant_value (stmt);
+ break;
+
default:
break;
}
int sv = optimize, nw = sv;
tree callee = get_callee_fndecl (x);
- if (tree fndecl = cp_get_callee_fndecl_nofold (x))
- if (DECL_IMMEDIATE_FUNCTION_P (fndecl)
- && source_location_current_p (fndecl))
- {
- x = cxx_constant_value (x);
- break;
- }
-
/* Some built-in function calls will be evaluated at compile-time in
fold (). Set optimize to 1 when folding __builtin_constant_p inside
a constexpr function so that fold_builtin_1 doesn't fold it to 0. */