diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2020-01-17 20:45:01 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2020-01-17 20:45:01 +0000 |
commit | 706b4fc47bbc608932d3b491ae19a3b9cde9497b (patch) | |
tree | 4adf86a776049cbf7f69a1929c4babcbbef925eb /clang/lib/Tooling/InterpolatingCompilationDatabase.cpp | |
parent | 7cc9cf2bf09f069cb2dd947ead05d0b54301fb71 (diff) |
Notes
Diffstat (limited to 'clang/lib/Tooling/InterpolatingCompilationDatabase.cpp')
-rw-r--r-- | clang/lib/Tooling/InterpolatingCompilationDatabase.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/Tooling/InterpolatingCompilationDatabase.cpp b/clang/lib/Tooling/InterpolatingCompilationDatabase.cpp index 59b66abe65e9..2cc819a498c6 100644 --- a/clang/lib/Tooling/InterpolatingCompilationDatabase.cpp +++ b/clang/lib/Tooling/InterpolatingCompilationDatabase.cpp @@ -191,7 +191,8 @@ struct TransferableCommand { OldArgs.data() + OldPos, OldArgs.data() + Pos); } - if (Std != LangStandard::lang_unspecified) // -std take precedence over -x + // Make use of -std iff -x was missing. + if (Type == types::TY_INVALID && Std != LangStandard::lang_unspecified) Type = toType(LangStandard::getLangStandardForKind(Std).getLanguage()); Type = foldType(*Type); // The contract is to store None instead of TY_INVALID. |