[PATCH] D45836: Don't do aligned allocations on MSVCRT before 19.12 (update 15.3)

2018-04-19 Thread Reid Kleckner via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rCXX330372: Don't do aligned allocations on MSVCRT before 19.12 (update 15.3) (authored by rnk, committed by ). Changed prior to commit: https://reviews.llvm.org/D45836?vs=143161&id=143173#toc Repository

r330375 - [analyzer] RetainCount: Accept more "safe" CFRetain wrappers.

2018-04-19 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Thu Apr 19 16:00:22 2018 New Revision: 330375 URL: http://llvm.org/viewvc/llvm-project?rev=330375&view=rev Log: [analyzer] RetainCount: Accept more "safe" CFRetain wrappers. r315736 added support for the misplaced CF_RETURNS_RETAINED annotation on CFRetain() wrappers. It w

[PATCH] D45117: [analyzer] Fix diagnostics in callees of interesting callees.

2018-04-19 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. Herald added a subscriber: baloghadamsoftware. https://reviews.llvm.org/rC330375 has nothing to do with this review; i misplaced the link in the commit message again. Repository: rL LLVM https://reviews.llvm.org/D45117 ___ c

[PATCH] D45335: [analyzer] RetainCount: Accept more "safe" CFRetain wrappers.

2018-04-19 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ accepted this revision. NoQ added a comment. This revision is now accepted and ready to land. Herald added a subscriber: baloghadamsoftware. Committed in https://reviews.llvm.org/rC330375 but i misplaced the phabricator link again, sorry. Repository: rC Clang https://reviews.llvm.org/D45

r330377 - [CFG] [analyzer] Don't treat argument constructors as temporary constructors.

2018-04-19 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Thu Apr 19 16:09:22 2018 New Revision: 330377 URL: http://llvm.org/viewvc/llvm-project?rev=330377&view=rev Log: [CFG] [analyzer] Don't treat argument constructors as temporary constructors. Function argument constructors (that are used for passing objects into functions by

[PATCH] D45650: [CFG] [analyzer] Don't treat argument constructors as temporary constructors.

2018-04-19 Thread Phabricator via Phabricator via cfe-commits
This revision was not accepted when it landed; it landed in state "Needs Review". This revision was automatically updated to reflect the committed changes. Closed by commit rC330377: [CFG] [analyzer] Don't treat argument constructors as temporary constructors. (authored by dergachev, committed by

[PATCH] D45650: [CFG] [analyzer] Don't treat argument constructors as temporary constructors.

2018-04-19 Thread Phabricator via Phabricator via cfe-commits
This revision was not accepted when it landed; it landed in state "Needs Review". This revision was automatically updated to reflect the committed changes. Closed by commit rL330377: [CFG] [analyzer] Don't treat argument constructors as temporary constructors. (authored by dergachev, committed by

r330378 - Implement proper support for `-falign-functions`

2018-04-19 Thread Saleem Abdulrasool via cfe-commits
Author: compnerd Date: Thu Apr 19 16:14:57 2018 New Revision: 330378 URL: http://llvm.org/viewvc/llvm-project?rev=330378&view=rev Log: Implement proper support for `-falign-functions` This implements support for the previously ignored flag `-falign-functions`. This allows the frontend to request

r330380 - [analyzer] When we fail to evaluate a pointer cast, escape the pointer.

2018-04-19 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Thu Apr 19 16:24:32 2018 New Revision: 330380 URL: http://llvm.org/viewvc/llvm-project?rev=330380&view=rev Log: [analyzer] When we fail to evaluate a pointer cast, escape the pointer. If a pointer cast fails (evaluates to an UnknownVal, i.e. not implemented in the analyzer

[PATCH] D45698: [analyzer] When we fail to evaluate a pointer cast, escape the pointer.

2018-04-19 Thread Phabricator via Phabricator via cfe-commits
This revision was not accepted when it landed; it landed in state "Needs Review". This revision was automatically updated to reflect the committed changes. Closed by commit rC330380: [analyzer] When we fail to evaluate a pointer cast, escape the pointer. (authored by dergachev, committed by ). He

[PATCH] D45698: [analyzer] When we fail to evaluate a pointer cast, escape the pointer.

2018-04-19 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. In https://reviews.llvm.org/D45698#1069121, @xazax.hun wrote: > I am in favour of this approach. This is what I suggested back than in > https://reviews.llvm.org/D23014 but it was somehow overlooked. I'll try to follow-up on this. Repository: rC Clang https://reviews.

r330382 - [CFG] [analyzer] Add construction contexts for loop condition variables.

2018-04-19 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Thu Apr 19 16:30:15 2018 New Revision: 330382 URL: http://llvm.org/viewvc/llvm-project?rev=330382&view=rev Log: [CFG] [analyzer] Add construction contexts for loop condition variables. Loop condition variables, eg. while (shared_ptr P = getIntPtr()) { ... }) weren't ha

[PATCH] D45706: [CFG] [analyzer] Add construction contexts for loop condition variables.

2018-04-19 Thread Phabricator via Phabricator via cfe-commits
This revision was not accepted when it landed; it landed in state "Needs Review". This revision was automatically updated to reflect the committed changes. Closed by commit rL330382: [CFG] [analyzer] Add construction contexts for loop condition variables. (authored by dergachev, committed by ). H

[PATCH] D45839: [analyzer] Add support for WebKit "unified sources".

2018-04-19 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ updated this revision to Diff 143195. NoQ added a comment. Hopefully a more portable way of testing this stuff. https://reviews.llvm.org/D45839 Files: include/clang/StaticAnalyzer/Core/PathSensitive/AnalysisManager.h lib/StaticAnalyzer/Core/CallEvent.cpp lib/StaticAnalyzer/Core/ExprEn

[PATCH] D45679: [clang-tidy] Add a helper function isModified, that checks whether an expression is modified within a statement.

2018-04-19 Thread Shuai Wang via Phabricator via cfe-commits
shuaiwang updated this revision to Diff 143197. shuaiwang marked 13 inline comments as done. shuaiwang added a comment. - Moved out of ASTUtils and becomes a separte class ExprMutationAnalyzer (bikeshedding on name a bit.) - Reverted back to return bool instead of tri-valued enum, the meanings of

[PATCH] D45679: [clang-tidy] Add a helper function isModified, that checks whether an expression is modified within a statement.

2018-04-19 Thread Shuai Wang via Phabricator via cfe-commits
shuaiwang added a comment. Regarding full dependency analysis, I think it's out of the scope of this change at least for now. We're only trying to find //one// possible point where the given `Expr` is (assumed to be) mutated. This is known to be useful at this point for use cases like "check wh

[PATCH] D45827: [CUDA] Enable CUDA compilation with CUDA-9.2

2018-04-19 Thread Justin Lebar via Phabricator via cfe-commits
jlebar accepted this revision. jlebar added a comment. This revision is now accepted and ready to land. Well that was unusually easy... https://reviews.llvm.org/D45827 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi

[PATCH] D45771: [Driver] Support for -save-stats in AddGoldPlugin.

2018-04-19 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd accepted this revision. compnerd added a comment. Some cleanup suggestions included, but I like the change overall. Comment at: lib/Driver/ToolChains/CommonArgs.cpp:1250 + // Setup statistics file output. + if (const Arg *A = Args.getLastArg(options::OPT_save_stats_E

[PATCH] D45319: [Atomics] warn about misaligned atomic accesses using libcalls

2018-04-19 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd added inline comments. Comment at: clang/lib/CodeGen/CGAtomic.cpp:883 if (UseLibcall) { +CGM.getDiags().Report(E->getLocStart(), diag::warn_atomic_op_misaligned); + t.p.northover wrote: > compnerd wrote: > > It is kinda unfortunate that you need t

[PATCH] D45702: [clang-tidy] Add a new check, readability-redundant-data-call, that finds and removes redundant calls to .data().

2018-04-19 Thread Shuai Wang via Phabricator via cfe-commits
shuaiwang updated this revision to Diff 143204. shuaiwang marked 7 inline comments as done. shuaiwang added a comment. Addressed review comments. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D45702 Files: clang-tidy/readability/CMakeLists.txt clang-tidy/readability/Readabi

[PATCH] D45702: [clang-tidy] Add a new check, readability-redundant-data-call, that finds and removes redundant calls to .data().

2018-04-19 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tidy/readability/RedundantDataCallCheck.cpp:22 + +const char kDefaultTypes[] = +"::std::basic_string;::std::basic_string_view;::std::vector;::std::array"; Actually you should use static, not anonymous na

[PATCH] D45702: [clang-tidy] Add a new check, readability-redundant-data-call, that finds and removes redundant calls to .data().

2018-04-19 Thread Shuai Wang via Phabricator via cfe-commits
shuaiwang updated this revision to Diff 143207. shuaiwang marked 7 inline comments as done. shuaiwang added a comment. Addressed more comments. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D45702 Files: clang-tidy/readability/CMakeLists.txt clang-tidy/readability/Readabili

[PATCH] D45702: [clang-tidy] Add a new check, readability-redundant-data-call, that finds and removes redundant calls to .data().

2018-04-19 Thread Shuai Wang via Phabricator via cfe-commits
shuaiwang added inline comments. Comment at: clang-tidy/readability/RedundantDataCallCheck.cpp:22 + +const char kDefaultTypes[] = +"::std::basic_string;::std::basic_string_view;::std::vector;::std::array"; Eugene.Zelenko wrote: > Actually you should use stati

[PATCH] D45702: [clang-tidy] Add a new check, readability-redundant-data-call, that finds and removes redundant calls to .data().

2018-04-19 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tidy/readability/RedundantDataCallCheck.cpp:22 + +const char kDefaultTypes[] = +"::std::basic_string;::std::basic_string_view;::std::vector;::std::array"; shuaiwang wrote: > Eugene.Zelenko wrote: > > Act

[PATCH] D45774: [analyzer] cover more cases where a Loc can be bound to constants

2018-04-19 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. Looks great, thanks! > CXXDynamicCastExpr: I don't think evalCast would handle this correctly, does > it? Seems so. It is partially supported by `StoreManager::attemptDownCast()`. I also see relatively little urgency in handling it here because the whole point of `dynamic

[PATCH] D45212: [HIP] Let CUDA toolchain support HIP language mode and amdgpu

2018-04-19 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl marked 21 inline comments as done. yaxunl added inline comments. Comment at: include/clang/Driver/Options.td:552-553 +def : Joined<["--"], "offload-arch=">, Alias; +def offload_archs : Joined<["--"], "offload-archs=">, Flags<[DriverOption]>, + HelpText<"List of offload ar

[PATCH] D44882: [clangd] Implementation of workspace/symbol request

2018-04-19 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle updated this revision to Diff 143219. malaperle marked 5 inline comments as done. malaperle added a comment. Address comments. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D44882 Files: clangd/CMakeLists.txt clangd/ClangdLSPServer.cpp clangd/ClangdLSPServer.h

[PATCH] D44882: [clangd] Implementation of workspace/symbol request

2018-04-19 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle added a comment. Sorry for the embarrassing clean-ups I forgot! Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D44882 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cf

[PATCH] D45212: [HIP] Let CUDA toolchain support HIP language mode and amdgpu

2018-04-19 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl updated this revision to Diff 143218. yaxunl marked 14 inline comments as done. yaxunl added a comment. Revised by Artem's comments. https://reviews.llvm.org/D45212 Files: include/clang/Basic/DiagnosticDriverKinds.td include/clang/Driver/Action.h include/clang/Driver/Options.td i

[PATCH] D44882: [clangd] Implementation of workspace/symbol request

2018-04-19 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle updated this revision to Diff 143220. malaperle added a comment. Remove more includes. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D44882 Files: clangd/CMakeLists.txt clangd/ClangdLSPServer.cpp clangd/ClangdLSPServer.h clangd/ClangdServer.cpp clangd/Clangd

[PATCH] D45860: [Coroutines] Catch exceptions in await_resume

2018-04-19 Thread Brian Gesiak via Phabricator via cfe-commits
modocache created this revision. modocache added reviewers: GorNishanov, EricWF. http://wg21.link/P0664r2 section "Evolution/Core Issues 24" describes a proposed change to Coroutines TS that would have any exceptions thrown after the initial suspend point of a coroutine be caught by the handler sp

Re: [clang-tools-extra] r330245 - [clang-tidy] Fix clang-tidy doesn't read .clangtidy configuration file.

2018-04-19 Thread Mikael Holmén via cfe-commits
Thanks! On 04/19/2018 03:39 PM, Haojian Wu wrote: Thanks! I didn't see this warning when running check-clang-tools on my machine. Fixed in r330327. On Thu, Apr 19, 2018 at 7:39 AM, Mikael Holmén mailto:mikael.hol...@ericsson.com>> wrote: Hi, On 04/18/2018 10:54 AM, Haojian Wu via

[PATCH] D45839: [analyzer] Add support for WebKit "unified sources".

2018-04-19 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware added inline comments. Comment at: include/clang/StaticAnalyzer/Core/PathSensitive/AnalysisManager.h:148 + Name.endswith_lower(".cc") || Name.endswith_lower(".m") || + Name.endswith_lower(".mm")) { +return true; Altho

<    1   2