The /GX flag is disabled unless explicitly specified on the command
line. This partially addresses PR26698.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@261537
91177308-0d34-0410-b5e6-
96231b3b80d8
}
}
// The /GX, /GX- flags are only processed if there are not /EH flags.
+ // The default is that /GX is not specified.
if (EHArgs.empty() &&
- Args.hasFlag(options::OPT__SLASH_GX, options::OPT__SLASH_GX_)) {
+ Args.hasFlag(options::OPT__SLASH_GX, options::OPT__SLASH_GX_,
+ /*default=*/false)) {
EH.Synch = true;
EH.NoUnwindC = true;
}
// RUN: %clang_cl /FI asdf.h -### -- %s 2>&1 | FileCheck -check-prefix=FI_ %s
// FI_: "-include" "asdf.h"
+// RUN: %clang_cl /c -### -- %s 2>&1 | FileCheck -check-prefix=NO-GX %s
+// NO-GX-NOT: "-fcxx-exceptions" "-fexceptions"
+
// RUN: %clang_cl /c /GX -### -- %s 2>&1 | FileCheck -check-prefix=GX %s
// GX: "-fcxx-exceptions" "-fexceptions"