[PATCH] D53280: [analyzer] Emit an error for invalid -analyzer-config inputs

2018-12-12 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. >> The deadline is around the creation of the 8.0.0. release branch, right? > > I'd feel slightly more comfortable if some sort of fix gets in before the > Christmas break. Sure! :) Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D53280/

[PATCH] D53280: [analyzer] Emit an error for invalid -analyzer-config inputs

2018-12-12 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. In D53280#1325375 , @Szelethus wrote: > I guess the solution would be to check whether there are any user supplied > flags with "analyze" substring, and add the compatibility flag then. It is > possible if not probable that a non-sta

[PATCH] D53280: [analyzer] Emit an error for invalid -analyzer-config inputs

2018-12-10 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. I guess the solution would be to check whether there are any user supplied flags with "analyze" substring, and add the compatibility flag then. It is possible if not probable that a non-static-analyzer related flag with a name like that will eventually be added, but I

[PATCH] D53280: [analyzer] Emit an error for invalid -analyzer-config inputs

2018-12-04 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus marked an inline comment as done. Szelethus added a comment. In D53280#1319503 , @NoQ wrote: > It's a flag that was removed but old soft doesn't know that it was removed, > and it won't be fixed because it's old. We could just add the flag bac

[PATCH] D53280: [analyzer] Emit an error for invalid -analyzer-config inputs

2018-12-04 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. It's a flag that was removed but old soft doesn't know that it was removed, and it won't be fixed because it's old. I guess a typo would have caused the same problem. Not urgent, no pressure. Yes, i believe this patch is good and should stay there. At the same time, by the

[PATCH] D53280: [analyzer] Emit an error for invalid -analyzer-config inputs

2018-12-04 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus marked an inline comment as done. Szelethus added inline comments. Comment at: lib/Driver/ToolChains/Clang.cpp:3307-3309 void Clang::ConstructJob(Compilation &C, const JobAction &JA, const InputInfo &Output, const InputInfoList &Inputs,

[PATCH] D53280: [analyzer] Emit an error for invalid -analyzer-config inputs

2018-12-04 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. In D53280#1319446 , @NoQ wrote: > Ugh. We broke backwards compatibility when an invalid `-analyzer-config` is > specified but `-analyze` isn't specified. Yes, people are accidentally > relying on that :/ :/ :/ > > In this case

[PATCH] D53280: [analyzer] Emit an error for invalid -analyzer-config inputs

2018-12-04 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. Ugh. We broke backwards compatibility when an invalid `-analyzer-config` is specified but `-analyze` isn't specified. Yes, people are accidentally relying on that :/ :/ :/ In this case the driver doesn't know that it needs to add `analyzer-config-compatibility-mode=true` (

[PATCH] D53280: [analyzer] Emit an error for invalid -analyzer-config inputs

2018-11-30 Thread Umann Kristóf via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Szelethus marked an inline comment as done. Closed by commit rC348038: [analyzer] Emit an error for invalid -analyzer-config inputs (authored by Szelethus, committed by ). Changed prior to commit: https://reviews.llvm.org

[PATCH] D53280: [analyzer] Emit an error for invalid -analyzer-config inputs

2018-11-30 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus marked 6 inline comments as done. Szelethus added inline comments. Comment at: lib/Frontend/CompilerInvocation.cpp:367 - parseAnalyzerConfigs(Opts, Diags); + if (Opts.ShouldEmitErrorsOnInvalidConfigValue) +parseAnalyzerConfigs(Opts, &Diags); xaz

[PATCH] D53280: [analyzer] Emit an error for invalid -analyzer-config inputs

2018-11-29 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus marked 2 inline comments as done. Szelethus added a comment. Thanks! Comment at: lib/Frontend/CompilerInvocation.cpp:363 + A->claim(); Opts.Config[key] = val; } NoQ wrote: > Maybe we can eventually turn this into an array and address

[PATCH] D53280: [analyzer] Emit an error for invalid -analyzer-config inputs

2018-11-29 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ accepted this revision. NoQ added a comment. Thanks, this looks great! Comment at: lib/Frontend/CompilerInvocation.cpp:363 + A->claim(); Opts.Config[key] = val; } Maybe we can eventually turn this into an array and address by index that's

[PATCH] D53280: [analyzer] Emit an error for invalid -analyzer-config inputs

2018-11-28 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus marked 2 inline comments as done. Szelethus added inline comments. Comment at: lib/Driver/ToolChains/Clang.cpp:2348 + // Enable compatilibily mode to avoid analyzer-config related errors. + CmdArgs.push_back("-analyzer-config-compatibility-mode=true"); + -

[PATCH] D53280: [analyzer] Emit an error for invalid -analyzer-config inputs

2018-11-27 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus added a comment. Thanks! I'll commit around friday (with the requested fixes) to leave enough time for everyone to object. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D53280/new/ https://reviews.llvm.org/D53280 _

[PATCH] D53280: [analyzer] Emit an error for invalid -analyzer-config inputs

2018-11-27 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun accepted this revision. xazax.hun added a comment. This revision is now accepted and ready to land. Overall looks good to me, some minor comments inline. Comment at: include/clang/StaticAnalyzer/Core/AnalyzerOptions.h:231 #define ANALYZER_OPTION(TYPE, NAME, CMDFLAG,

[PATCH] D53280: [analyzer] Emit an error for invalid -analyzer-config inputs

2018-11-26 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus added a comment. Polite ping. :) I'd be most comfortable landing D53692 together with this patch. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D53280/new/ https://reviews.llvm.org/D53280

[PATCH] D53280: [analyzer] Emit an error for invalid -analyzer-config inputs

2018-11-16 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus updated this revision to Diff 174495. Szelethus retitled this revision from "[analyzer] Emit a warning for unknown -analyzer-config options" to "[analyzer] Emit an error for invalid -analyzer-config inputs". Szelethus set the repository for this revision to rC Clang. Szelethus added a c