[PATCH] D55159: Lex: Fix bug in __BASE_FILE__ implementation.

2018-11-30 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc created this revision. pcc added a reviewer: rsmith. Herald added a subscriber: llvm-commits. __BASE_FILE__ previously expanded to "" instead of the name of the main source file in files included using -include. Also added test coverage for __BASE_FILE__ since there doesn't seem to be any.

[PATCH] D55057: [Headers] Make max_align_t match GCC's implementation.

2018-11-30 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF marked 2 inline comments as done. EricWF added a comment. @jyknight wrote: > And then use that to determine whether to add float128 to the union? Note that `max_align_t` isn't a union of these types, but a struct containing all of them. This seems like a bug to me, but it's what GNU

[clang-tools-extra] r348066 - [clangd] Recommit the "AnyScope" changes in requests.json by rCTE347753 (reverted by rCTE347792)

2018-11-30 Thread Fangrui Song via cfe-commits
Author: maskray Date: Fri Nov 30 17:57:15 2018 New Revision: 348066 URL: http://llvm.org/viewvc/llvm-project?rev=348066=rev Log: [clangd] Recommit the "AnyScope" changes in requests.json by rCTE347753 (reverted by rCTE347792) This fixes IndexBenchmark tests. Modified:

r348065 - [Basic] Move DiagnosticsEngine::dump from .h to .cpp

2018-11-30 Thread Fangrui Song via cfe-commits
Author: maskray Date: Fri Nov 30 17:43:05 2018 New Revision: 348065 URL: http://llvm.org/viewvc/llvm-project?rev=348065=rev Log: [Basic] Move DiagnosticsEngine::dump from .h to .cpp The two LLVM_DUMP_METHOD methods have a undefined reference on clang::DiagnosticsEngine::DiagStateMap::dump.

[PATCH] D55007: [Analyzer] Constraint Manager - Calculate Effective Range for Differences

2018-11-30 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. Is it an option to canonicalize the expression so that `B - A` was never stored in the first place? I.e., do this range intersection at the moment of writing the range, not at the moment of reading the range. This could be implemented by, say, comparing symbol IDs for `A`

[PATCH] D53329: Generate DIFile with main program if source is not available

2018-11-30 Thread Yonghong Song via Phabricator via cfe-commits
yonghong-song added a comment. F7630900: clang-crash-x86-2.tar @scott.linder Actually clang can get source for remapped files. I just uploaded another test tarball which may help you debug the issue. The test script is changed as well since recent llvm/clang

r348062 - Relax test to also work on Windows.

2018-11-30 Thread Adrian Prantl via cfe-commits
Author: adrian Date: Fri Nov 30 17:30:00 2018 New Revision: 348062 URL: http://llvm.org/viewvc/llvm-project?rev=348062=rev Log: Relax test to also work on Windows. Modified: cfe/trunk/test/CodeGenCXX/debug-prefix-map-lambda.cpp Modified: cfe/trunk/test/CodeGenCXX/debug-prefix-map-lambda.cpp

[PATCH] D54903: [Sema] Improve static_assert diagnostics.

2018-11-30 Thread Arthur O'Dwyer via Phabricator via cfe-commits
Quuxplusone added a comment. Looks fine to me; please don't let //me// block this any further. :) Someone else, e.g. @aaron.ballman, should be the one to accept it, though. Comment at: include/clang/AST/NestedNameSpecifier.h:220 + void print(raw_ostream , const

[PATCH] D54834: [analyzer][MallocChecker] Improve warning messages on double-delete errors

2018-11-30 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. Thanks, nice catch! It seems that the `ReportDoubleDelete()` thing was never used for reporting double-delete, but it was used for some strange check when a destructor is called. Is that old code

[PATCH] D55151: [gcov/Darwin] Ensure external symbols are exported when using an export list

2018-11-30 Thread Juergen Ributzka via Phabricator via cfe-commits
ributzka accepted this revision. ributzka added a comment. This revision is now accepted and ready to land. LGTM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55151/new/ https://reviews.llvm.org/D55151 ___ cfe-commits mailing list

[PATCH] D55151: [gcov/Darwin] Ensure external symbols are exported when using an export list

2018-11-30 Thread Vedant Kumar via Phabricator via cfe-commits
vsk marked an inline comment as done. vsk added inline comments. Comment at: clang/lib/Driver/ToolChains/Darwin.cpp:1037 if (hasExportSymbolDirective(Args)) { -addExportedSymbol(CmdArgs, "___llvm_profile_filename"); -addExportedSymbol(CmdArgs,

[PATCH] D55151: [gcov/Darwin] Ensure external symbols are exported when using an export list

2018-11-30 Thread Juergen Ributzka via Phabricator via cfe-commits
ributzka added inline comments. Comment at: clang/lib/Driver/ToolChains/Darwin.cpp:1037 if (hasExportSymbolDirective(Args)) { -addExportedSymbol(CmdArgs, "___llvm_profile_filename"); -addExportedSymbol(CmdArgs, "___llvm_profile_raw_version"); -

[PATCH] D54823: [analyzer][MallocChecker][NFC] Document and reorganize some functions

2018-11-30 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. Yay. Wow. Cool. Thanks. I heard that previously there was an explicit desire to avoid doxygen comments in checkers because they're quite useless because the checker is usually all in one file and

r348060 - Honor -fdebug-prefix-map when creating function names for the debug info.

2018-11-30 Thread Adrian Prantl via cfe-commits
Author: adrian Date: Fri Nov 30 16:24:27 2018 New Revision: 348060 URL: http://llvm.org/viewvc/llvm-project?rev=348060=rev Log: Honor -fdebug-prefix-map when creating function names for the debug info. This adds a callback to PrintingPolicy to allow CGDebugInfo to remap file paths according to

[PATCH] D55137: Honor -fdebug-prefix-map when creating function names for the debug info.

2018-11-30 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC348060: Honor -fdebug-prefix-map when creating function names for the debug info. (authored by adrian, committed by ). Changed prior to commit: https://reviews.llvm.org/D55137?vs=176194=176225#toc

[PATCH] D55137: Honor -fdebug-prefix-map when creating function names for the debug info.

2018-11-30 Thread Adrian Prantl via Phabricator via cfe-commits
aprantl marked an inline comment as done. aprantl added inline comments. Comment at: test/CodeGenCXX/debug-prefix-map-lambda.cpp:7 + // CHECK: !DISubprogram(name: "b<(lambda at + // CHECK-SAME: /SOURCE_ROOT/debug-prefix-map-lambda.cpp + // CHECK-SAME:

[PATCH] D54466: [Analyzer] Iterator Checkers - Use the region of the topmost base class for iterators stored in a region

2018-11-30 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. Huh, gotcha :) The nomenclature is mostly correct, just feels weird. Super-region of a region is a larger region. Sub-region is a smaller region. Base region is the largest non-memspace superregion, so it's a //larger// region. Derived class object is a large object. Base

[PATCH] D55151: [gcov/Darwin] Ensure external symbols are exported when using an export list

2018-11-30 Thread Vedant Kumar via Phabricator via cfe-commits
vsk created this revision. vsk added reviewers: ributzka, steven_wu, calixte, marco-c. Make sure that symbols needed to implement runtime support for gcov are exported when using an export list on Darwin. Without the clang driver exporting these symbols, the linker hides them, resulting in tapi

[PATCH] D55066: [ASan] Minor documentation fix: remove static linking limitation.

2018-11-30 Thread Evgenii Stepanov via Phabricator via cfe-commits
eugenis requested changes to this revision. eugenis added a comment. This revision now requires changes to proceed. Sorry for the delay. This is wrong, static linking is NOT supported. You could be confusing it with static linking of asan runtime library to an executable - that is and has always

[PATCH] D55101: [clang-tidy] Ignore namespaced and C++ member functions in google-objc-function-naming check 

2018-11-30 Thread Stephane Moore via Phabricator via cfe-commits
stephanemoore added a comment. In D55101#1315294 , @benhamilton wrote: > > Would you be okay with landing this fix and if we get any further reports > > for Objective-C++ sources then we can suppress it in all C++/Objective-C++ > > sources? I think

[PATCH] D54437: [analyzer][NFC] Merge ClangCheckerRegistry to CheckerRegistry

2018-11-30 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. Yay! Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D54437/new/ https://reviews.llvm.org/D54437 ___ cfe-commits mailing

[PATCH] D54436: [analyzer][NFC] Move CheckerRegistry from the Core directory to Frontend

2018-11-30 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ accepted this revision. NoQ added a comment. Thanks for the cleanup! One thing to test here is whether this works (or, at least, builds) when compiling clang without the analyzer. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D54436/new/

r348053 - Revert "Revert r347417 "Re-Reinstate 347294 with a fix for the failures.""

2018-11-30 Thread Fangrui Song via cfe-commits
Author: maskray Date: Fri Nov 30 15:41:18 2018 New Revision: 348053 URL: http://llvm.org/viewvc/llvm-project?rev=348053=rev Log: Revert "Revert r347417 "Re-Reinstate 347294 with a fix for the failures."" It seems the two failing tests can be simply fixed after r348037 Fix 3 cases in

[PATCH] D54401: [analyzer] Prefer returns values to out-params in CheckerRegistry.cpp

2018-11-30 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a subscriber: alexfh. NoQ added a comment. The code looks good, but i vaguely remember that we might accidentally break clang-tidy integration that uses this API to enable/disable specific checkers via `-checks=-analyzer-...`. *summons @alexfh* CHANGES SINCE LAST ACTION

[PATCH] D54149: [Analyzer] [WIP] Standard C++ library functions checker for the std::find() family

2018-11-30 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. Herald added a subscriber: gamesh411. Such checker is useful. It'd be great to add a lot of "pure" functions into it, simply for the sake of pointing out that they have no side effects, i.e. avoid unnecessary invalidation. The bound-to-argument constraint is useful. It

[PATCH] D47757: [Sema] Produce diagnostics when unavailable aligned allocation/deallocation functions are called

2018-11-30 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak updated this revision to Diff 176214. ahatanak added a comment. Herald added a subscriber: jkorous. Rebase & ping. I've reverted the changes I made to test/SemaCUDA/call-host-fn-from-device.cu since r342749 fixed the overload resolution bug. Repository: rC Clang CHANGES SINCE LAST

[PATCH] D55125: [clang-tidy] Fix a false positive in misc-redundant-expression check

2018-11-30 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus added a subscriber: donat.nagy. Szelethus added a comment. I see your point, but here's why I think it isn't a bug: I like to see macros as `constexpr` variables, and if I used those instead, I personally wouldn't like to get a warning just because they have the same value. In C,

[PATCH] D55150: Emit warnings from the driver for use of -mllvm or -Xclang options.

2018-11-30 Thread James Y Knight via Phabricator via cfe-commits
jyknight created this revision. jyknight added reviewers: rsmith, chandlerc. Herald added a subscriber: arphaman. This warning, Wexperimental-driver-option, is on by default, exempt from -Werror, and may be disabled. Additionally, change the documentation to note that these options are not

[PATCH] D55101: [clang-tidy] Ignore namespaced and C++ member functions in google-objc-function-naming check 

2018-11-30 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton added a comment. > Would you be okay with landing this fix and if we get any further reports for > Objective-C++ sources then we can suppress it in all C++/Objective-C++ > sources? I think there is enough value to enforcing the naming conventions on > non-namespaced C functions in

[PATCH] D55066: [ASan] Minor documentation fix: remove static linking limitation.

2018-11-30 Thread Max Moroz via Phabricator via cfe-commits
Dor1s added a comment. PTAL, it's a single line change, I just need someone to confirm that I'm not mistaken :) Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55066/new/ https://reviews.llvm.org/D55066 ___

r348044 - [analyzer] Deleting unnecessary test file

2018-11-30 Thread Kristof Umann via cfe-commits
Author: szelethus Date: Fri Nov 30 14:32:17 2018 New Revision: 348044 URL: http://llvm.org/viewvc/llvm-project?rev=348044=rev Log: [analyzer] Deleting unnecessary test file That I really should've done in rC348031. Removed: cfe/trunk/test/Analysis/analyzer-config.cpp Removed:

[PATCH] D55101: [clang-tidy] Ignore namespaced and C++ member functions in google-objc-function-naming check 

2018-11-30 Thread Stephane Moore via Phabricator via cfe-commits
stephanemoore added a comment. In D55101#1314716 , @benhamilton wrote: > IMHO we should just disable this check entirely for C++ files (including > Objective-C++). > > Since Objective-C++ files will have a mix of the Google Objective-C and > Google C++

[PATCH] D55101: [clang-tidy] Ignore namespaced and C++ member functions in google-objc-function-naming check 

2018-11-30 Thread Stephane Moore via Phabricator via cfe-commits
stephanemoore updated this revision to Diff 176206. stephanemoore marked an inline comment as done. stephanemoore added a comment. Re-formatted google-objc-function-naming.mm to LLVM style. Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55101/new/

Re: [PATCH] D53812: [Analyzer] Iterator Checker - Forbid increments past the begin() and decrements past the end() of containers

2018-11-30 Thread Artem Dergachev via cfe-commits
I suspect that the point is that previously we believed that decrementing below begin and than *incrementing* it back to begin() would yield begin(), but now we disallow this "incrementing back" behavior and warn immediately on decrement because in fact it's already UB. Though, yeah, the

[PATCH] D53738: [Fixed Point Arithmetic] Fixed Point Addition

2018-11-30 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added inline comments. Comment at: clang/include/clang/Basic/FixedPoint.h:67 + FixedPointSemantics + getCommonSemantics(const FixedPointSemantics ) const; + rjmccall wrote: > leonardchan wrote: > > rjmccall wrote: > > > Actually representing the

[PATCH] D53738: [Fixed Point Arithmetic] Fixed Point Addition

2018-11-30 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 176204. leonardchan marked 6 inline comments as done. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D53738/new/ https://reviews.llvm.org/D53738 Files: clang/include/clang/AST/ASTContext.h clang/include/clang/AST/Type.h

Re: [PATCH] D53812: [Analyzer] Iterator Checker - Forbid increments past the begin() and decrements past the end() of containers

2018-11-30 Thread Roman Lebedev via cfe-commits
""Re: [PATCH] D53812: [Analyzer] Iterator Checker - Forbid increments past the begin() and decrements past the end() of containers" Is it be or that reads backwards? Why can't you increment past the begin()? Can you decrement past the begin() instead? And the opposite for the end(). On Sat, Dec

[PATCH] D53812: [Analyzer] Iterator Checker - Forbid increments past the begin() and decrements past the end() of containers

2018-11-30 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. Makes perfect sense to me! Comment at: test/Analysis/iterator-range.cpp:190 + auto i0 = L.begin(); + --i0; // expected-warning{{Iterator accessed outside of its range}} +}

[PATCH] D53754: [Analyzer] Skip symbolic regions based on conjured symbols in comparison of the containers of iterators

2018-11-30 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. What makes you think that conjured symbols are special? Doesn't the same problem appear in the following example?: void foo(std::vector , std::vector ) { v2.erase(v1.cbegin()); } In this example if `foo()` is analyzed as a top level function, the respective

[PATCH] D54757: [clang-tidy] new check: bugprone-branch-clone

2018-11-30 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. Please close PR30233 after committing patch. Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D54757/new/ https://reviews.llvm.org/D54757 ___ cfe-commits mailing list

[PATCH] D53701: [Analyzer] Record and process comparison of symbols instead of iterator positions in interator checkers

2018-11-30 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. Herald added a subscriber: gamesh411. In D53701#1288682 , @baloghadamsoftware wrote: > I am almost sure it is implossible. It is not only about iterator-adapters in > the classical sense but also any iterator that internally deals

[PATCH] D55137: Honor -fdebug-prefix-map when creating function names for the debug info.

2018-11-30 Thread Paul Robinson via Phabricator via cfe-commits
probinson accepted this revision. probinson added a comment. This revision is now accepted and ready to land. LGTM aside from a grump about the test, which is totally up to you. Comment at: test/CodeGenCXX/debug-prefix-map-lambda.cpp:7 + // CHECK: !DISubprogram(name:

r348041 - Add myself as code owner for OpenBSD driver

2018-11-30 Thread Brad Smith via cfe-commits
Author: brad Date: Fri Nov 30 13:42:34 2018 New Revision: 348041 URL: http://llvm.org/viewvc/llvm-project?rev=348041=rev Log: Add myself as code owner for OpenBSD driver Modified: cfe/trunk/CODE_OWNERS.TXT Modified: cfe/trunk/CODE_OWNERS.TXT URL:

[PATCH] D55137: Honor -fdebug-prefix-map when creating function names for the debug info.

2018-11-30 Thread Adrian Prantl via Phabricator via cfe-commits
aprantl updated this revision to Diff 176194. aprantl added a comment. Only initialize `RemapFilePaths` when `DebugPrefixMap` is nonempty. Should be slightly faster. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55137/new/ https://reviews.llvm.org/D55137 Files:

[PATCH] D55137: Honor -fdebug-prefix-map when creating function names for the debug info.

2018-11-30 Thread Adrian Prantl via Phabricator via cfe-commits
aprantl added a comment. In D55137#1315133 , @dblaikie wrote: > Can't say I know much abouth the path remapping functionality - what it's > used for, where it's implemented in general, etc - so figure someone with > more of that knowledge might be best

r348039 - Revert r347417 "Re-Reinstate 347294 with a fix for the failures."

2018-11-30 Thread Fangrui Song via cfe-commits
Author: maskray Date: Fri Nov 30 13:26:09 2018 New Revision: 348039 URL: http://llvm.org/viewvc/llvm-project?rev=348039=rev Log: Revert r347417 "Re-Reinstate 347294 with a fix for the failures." Kept the "indirect_builtin_constant_p" test case in test/SemaCXX/constant-expression-cxx1y.cpp while

[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:

r348038 - [analyzer] Emit an error for invalid -analyzer-config inputs

2018-11-30 Thread Kristof Umann via cfe-commits
Author: szelethus Date: Fri Nov 30 13:24:31 2018 New Revision: 348038 URL: http://llvm.org/viewvc/llvm-project?rev=348038=rev Log: [analyzer] Emit an error for invalid -analyzer-config inputs Differential Revision: https://reviews.llvm.org/D53280 Added:

[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, );

[PATCH] D54630: Move detection of libc++ include dirs to Driver on MacOS

2018-11-30 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added a comment. So far everything looks fine, but I have to rerun a couple of things due to infrastructural issues. I should have the final results next Monday. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D54630/new/ https://reviews.llvm.org/D54630

r348037 - [ExprConstant] Try fixing __builtin_constant_p after D54355 (rC347417)

2018-11-30 Thread Fangrui Song via cfe-commits
Author: maskray Date: Fri Nov 30 13:15:41 2018 New Revision: 348037 URL: http://llvm.org/viewvc/llvm-project?rev=348037=rev Log: [ExprConstant] Try fixing __builtin_constant_p after D54355 (rC347417) Summary: Reinstate the original behavior (Success(false, E)) before D54355 when this branch is

r348033 - Adding tests for -ast-dump; NFC.

2018-11-30 Thread Aaron Ballman via cfe-commits
Author: aaronballman Date: Fri Nov 30 12:55:26 2018 New Revision: 348033 URL: http://llvm.org/viewvc/llvm-project?rev=348033=rev Log: Adding tests for -ast-dump; NFC. This adds tests for struct and union declarations in C. It also points out a bug when dumping anonymous record types -- they are

[PATCH] D55137: Honor -fdebug-prefix-map when creating function names for the debug info.

2018-11-30 Thread Paul Robinson via Phabricator via cfe-commits
probinson added inline comments. Comment at: lib/CodeGen/CGDebugInfo.cpp:238 + // Apply -fdebug-prefix-map. + PP.RemapFilePaths = true; + PP.remapPath = [this](StringRef Path) { return remapDIPath(Path); }; Unconditionally? CHANGES SINCE LAST ACTION

[PATCH] D54995: [MemoryBuffer] By default assume that all files are volatile to prevent unintended file locks

2018-11-30 Thread Ivan Donchevskii via Phabricator via cfe-commits
yvvan added a comment. @ilya-biryukov What do you think about the global settable bool in MemoryBuffer in place of the ifdef from https://reviews.llvm.org/D35200 ? In this case the client on Windows can set it and you're safe that any MemoryBuffer call never mmaps. CHANGES SINCE LAST ACTION

[PATCH] D55137: Honor -fdebug-prefix-map when creating function names for the debug info.

2018-11-30 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added a comment. Can't say I know much abouth the path remapping functionality - what it's used for, where it's implemented in general, etc - so figure someone with more of that knowledge might be best off reviewing this. CHANGES SINCE LAST ACTION

Re: [PATCH] D55076: [analyzer] RetainCountChecker: recognize that OSObject can be created directly using an operator "new"

2018-11-30 Thread George Karpenkov via cfe-commits
Pushed the fix. Again, sorry for the trouble. > On Nov 30, 2018, at 11:34 AM, George Karpenkov via cfe-commits > wrote: > > Good idea about using the mailing list, thanks, I’ll do that! > >> On Nov 30, 2018, at 11:30 AM, Aaron Ballman wrote: >> >> On Fri, Nov 30, 2018 at 2:26 PM George

[PATCH] D53692: [analyzer] Evaluate all non-checker config options before analysis

2018-11-30 Thread Umann Kristóf via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC348031: [analyzer] Evaluate all non-checker config options before analysis (authored by Szelethus, committed by ). Changed prior to commit: https://reviews.llvm.org/D53692?vs=172856=176183#toc

Re: [PATCH] D55076: [analyzer] RetainCountChecker: recognize that OSObject can be created directly using an operator "new"

2018-11-30 Thread Artem Dergachev via cfe-commits
Hmm, they don't have git-svn-id lines in the monorepo, which are handy for exactly that. In the multirepos i usually just /search the git log for the svn commit (without "r") and it quickly matches the git-svn-id line, eg.: git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@347951 //

r348032 - Revert r348029. I was git-ing and jumped the gun.

2018-11-30 Thread Bill Wendling via cfe-commits
Author: void Date: Fri Nov 30 12:44:11 2018 New Revision: 348032 URL: http://llvm.org/viewvc/llvm-project?rev=348032=rev Log: Revert r348029. I was git-ing and jumped the gun. Modified: cfe/trunk/lib/CodeGen/CGExprConstant.cpp cfe/trunk/test/CodeGen/builtin-constant-p.c Modified:

r348031 - [analyzer] Evaluate all non-checker config options before analysis

2018-11-30 Thread Kristof Umann via cfe-commits
Author: szelethus Date: Fri Nov 30 12:44:00 2018 New Revision: 348031 URL: http://llvm.org/viewvc/llvm-project?rev=348031=rev Log: [analyzer] Evaluate all non-checker config options before analysis In earlier patches regarding AnalyzerOptions, a lot of effort went into gathering all config

r348030 - Revert "Reverting r347949-r347951 because they broke the test bots."

2018-11-30 Thread George Karpenkov via cfe-commits
Author: george.karpenkov Date: Fri Nov 30 12:43:42 2018 New Revision: 348030 URL: http://llvm.org/viewvc/llvm-project?rev=348030=rev Log: Revert "Reverting r347949-r347951 because they broke the test bots." This reverts commit 5bad6129c012fbf186eb055be49344e790448ecc. Hopefully fixing the issue

r348029 - We're in a constant context in the ConstantEmitter.

2018-11-30 Thread Bill Wendling via cfe-commits
Author: void Date: Fri Nov 30 12:40:06 2018 New Revision: 348029 URL: http://llvm.org/viewvc/llvm-project?rev=348029=rev Log: We're in a constant context in the ConstantEmitter. Modified: cfe/trunk/lib/CodeGen/CGExprConstant.cpp cfe/trunk/test/CodeGen/builtin-constant-p.c Modified:

[PATCH] D55076: [analyzer] RetainCountChecker: recognize that OSObject can be created directly using an operator "new"

2018-11-30 Thread George Karpenkov via Phabricator via cfe-commits
george.karpenkov marked an inline comment as done. george.karpenkov added inline comments. Comment at: clang/lib/StaticAnalyzer/Core/RetainSummaryManager.cpp:483-497 case CE_Function: Summ = getFunctionSummary(cast(Call).getDecl()); break; case CE_CXXMember:

[PATCH] D53153: [OpenCL] Mark kernel functions with default visibility

2018-11-30 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. In D53153#1315107 , @yaxunl wrote: > In D53153#1315039 , @scott.linder > wrote: > > > In D53153#1314798 , @rjmccall > > wrote: > > > > > You

[PATCH] D53153: [OpenCL] Mark kernel functions with default visibility

2018-11-30 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. In D53153#1315039 , @scott.linder wrote: > In D53153#1314798 , @rjmccall wrote: > > > You still have the same linkage model for those other languages, right? > > Ultimately there's

Re: [PATCH] Add myself as code owner for OpenBSD driver

2018-11-30 Thread Richard Smith via cfe-commits
LGTM Thanks, welcome aboard :) On Thu, 29 Nov 2018, 06:01 Brad Smith via cfe-commits < cfe-commits@lists.llvm.org wrote: > Add myself as code owner for OpenBSD driver. > > > Index: CODE_OWNERS.TXT > === > --- CODE_OWNERS.TXT

[PATCH] D54995: [MemoryBuffer] By default assume that all files are volatile to prevent unintended file locks

2018-11-30 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. In D54995#1315024 , @zturner wrote: > We can work around it by reading the whole file, but it looks like a bug in > QtCreator to me. We have the file mapped, but maybe when they open the file > to save it, *they* are

r348028 - Expect mixed path separators in FileManagerTest when resolving paths on Win32

2018-11-30 Thread Matthew Voss via cfe-commits
Author: ormris Date: Fri Nov 30 11:52:50 2018 New Revision: 348028 URL: http://llvm.org/viewvc/llvm-project?rev=348028=rev Log: Expect mixed path separators in FileManagerTest when resolving paths on Win32 Modified: cfe/trunk/unittests/Basic/FileManagerTest.cpp Modified:

[PATCH] D55139: [clangd] Avoid memory-mapping files on Windows

2018-11-30 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov created this revision. ilya-biryukov added reviewers: hokein, kadircet. Herald added subscribers: arphaman, jkorous, MaskRay, ioeric, mgorny. Memory-mapping files on Windows leads to them being locked and prevents editors from saving changes to those files on disk. This is fine for

[PATCH] D55134: [CTU] Add triple/lang mismatch handling

2018-11-30 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus added a comment. Hah. Do we support CTU for other languages, like ObjC and ObjC++? Can this be an issue there? Comment at: lib/CrossTU/CrossTranslationUnit.cpp:59 +} +} + `// end of namespace llvm` Comment at:

Re: r348020 - Reverting r347949-r347951 because they broke the test bots.

2018-11-30 Thread David Green via cfe-commits
Thanks for the fix, And thanks for the work keeping the bots green! Dave From: Aaron Ballman Sent: 30 November 2018 19:35 To: David Green Cc: cfe-commits; nd Subject: Re: r348020 - Reverting r347949-r347951 because they broke the test bots.   On Fri, Nov 30, 2018 at 2:31 PM David Green

[PATCH] D53153: [OpenCL] Mark kernel functions with default visibility

2018-11-30 Thread Scott Linder via Phabricator via cfe-commits
scott.linder added a comment. In D53153#1314798 , @rjmccall wrote: > You still have the same linkage model for those other languages, right? > Ultimately there's something like a kernel function that has to be declared > specially and which becomes the

Re: [PATCH] D55076: [analyzer] RetainCountChecker: recognize that OSObject can be created directly using an operator "new"

2018-11-30 Thread George Karpenkov via cfe-commits
Good idea about using the mailing list, thanks, I’ll do that! > On Nov 30, 2018, at 11:30 AM, Aaron Ballman wrote: > > On Fri, Nov 30, 2018 at 2:26 PM George Karpenkov wrote: >> >> Thanks I’ll take a look. >> >> BTW when reverting could you use “git revert” or mention manually the >>

r348026 - Revert an inadvertent change from r348020.

2018-11-30 Thread Aaron Ballman via cfe-commits
Author: aaronballman Date: Fri Nov 30 11:32:35 2018 New Revision: 348026 URL: http://llvm.org/viewvc/llvm-project?rev=348026=rev Log: Revert an inadvertent change from r348020. Modified: cfe/trunk/.gitignore Modified: cfe/trunk/.gitignore URL:

Re: r348020 - Reverting r347949-r347951 because they broke the test bots.

2018-11-30 Thread Aaron Ballman via cfe-commits
On Fri, Nov 30, 2018 at 2:31 PM David Green wrote: > > Hello! > > > Did you intend to change the .gitignore here too? No! That's a great catch, sorry about that -- VS integration with CMake is rather broken without that manual change to .gitignore. :-( I've restored it in r348026 -- sorry for

[PATCH] D55137: Honor -fdebug-prefix-map when creating function names for the debug info.

2018-11-30 Thread Adrian Prantl via Phabricator via cfe-commits
aprantl updated this revision to Diff 176174. aprantl added a comment. fix a comment. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55137/new/ https://reviews.llvm.org/D55137 Files: include/clang/AST/PrettyPrinter.h lib/AST/TypePrinter.cpp lib/CodeGen/CGDebugInfo.cpp

[PATCH] D55137: Honor -fdebug-prefix-map when creating function names for the debug info.

2018-11-30 Thread Adrian Prantl via Phabricator via cfe-commits
aprantl created this revision. aprantl added reviewers: dblaikie, davide. aprantl added a project: debug-info. This adds a callback to `PrintingPolicy` to allow `CGDebugInfo` to remap file paths according to `-fdebug-prefix-map`. Otherwise the debug info (particularly function names for C++

Re: r348020 - Reverting r347949-r347951 because they broke the test bots.

2018-11-30 Thread David Green via cfe-commits
Hello! Did you intend to change the .gitignore here too? Cheers Dave From: cfe-commits on behalf of Aaron Ballman via cfe-commits Sent: 30 November 2018 18:52:51 To: cfe-commits@lists.llvm.org Subject: r348020 - Reverting r347949-r347951 because they broke

[PATCH] D55134: [CTU] Add triple/lang mismatch handling

2018-11-30 Thread Gabor Marton via Phabricator via cfe-commits
martong updated this revision to Diff 176172. martong added a comment. - Add lit tests Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55134/new/ https://reviews.llvm.org/D55134 Files: include/clang/Basic/DiagnosticCrossTUKinds.td

Re: [PATCH] D55076: [analyzer] RetainCountChecker: recognize that OSObject can be created directly using an operator "new"

2018-11-30 Thread Aaron Ballman via cfe-commits
On Fri, Nov 30, 2018 at 2:26 PM George Karpenkov wrote: > > Thanks I’ll take a look. > > BTW when reverting could you use “git revert” or mention manually the > phabricator revision being reverted, > and apply reverts atomically? > I (and many others) work exclusively using a git monorepo, so I

[PATCH] D54995: [MemoryBuffer] By default assume that all files are volatile to prevent unintended file locks

2018-11-30 Thread Zachary Turner via Phabricator via cfe-commits
zturner added a comment. We can work around it by reading the whole file, but it looks like a bug in QtCreator to me. We have the file mapped, but maybe when they open the file to save it, *they* are opening the file without `FILE_SHARE_READ`. It's a logical thing to do on the surface,

Re: [PATCH] D55076: [analyzer] RetainCountChecker: recognize that OSObject can be created directly using an operator "new"

2018-11-30 Thread George Karpenkov via cfe-commits
Thanks I’ll take a look. BTW when reverting could you use “git revert” or mention manually the phabricator revision being reverted, and apply reverts atomically? I (and many others) work exclusively using a git monorepo, so I don’t even have a straightforward way to lookup what "r347951” is.

[PATCH] D52988: [analyzer][PlistMacroExpansion] Part 5.: Support for # and ##

2018-11-30 Thread Umann Kristóf via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL348025: [analyzer][PlistMacroExpansion] Part 5.: Support for # and ## (authored by Szelethus, committed by ). Herald added subscribers: llvm-commits, gamesh411. Changed prior to commit:

[PATCH] D53329: Generate DIFile with main program if source is not available

2018-11-30 Thread Scott Linder via Phabricator via cfe-commits
scott.linder added a comment. The Verifier patch has landed as https://reviews.llvm.org/rL348022 I do not have any more knowledge than the reviewers of the right way to handle providing source for remapped files, but at least compilation will warn and strip debug-info rather than segfault when

r348025 - [analyzer][PlistMacroExpansion] Part 5.: Support for # and ##

2018-11-30 Thread Kristof Umann via cfe-commits
Author: szelethus Date: Fri Nov 30 11:21:35 2018 New Revision: 348025 URL: http://llvm.org/viewvc/llvm-project?rev=348025=rev Log: [analyzer][PlistMacroExpansion] Part 5.: Support for # and ## From what I can see, this should be the last patch needed to replicate macro argument expansions.

[PATCH] D54995: [MemoryBuffer] By default assume that all files are volatile to prevent unintended file locks

2018-11-30 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. In D54995#1314912 , @zturner wrote: > Original patch description says this: > > > There are reported cases of non-system files being locked by libclang on > > Windows (and likely by other clients as well) > > What is the

Re: [PATCH] D55076: [analyzer] RetainCountChecker: recognize that OSObject can be created directly using an operator "new"

2018-11-30 Thread Aaron Ballman via cfe-commits
On Fri, Nov 30, 2018 at 2:19 PM George Karpenkov wrote: > > Thanks and sorry about the trouble. I’ll recommit with size_t. No worries, it happens! FYI, I also had to commit r348023 as part of the reverts. ~Aaron > > On Nov 30, 2018, at 10:56 AM, Aaron Ballman wrote: > > On Fri, Nov 30, 2018 at

Re: [PATCH] D55076: [analyzer] RetainCountChecker: recognize that OSObject can be created directly using an operator "new"

2018-11-30 Thread George Karpenkov via cfe-commits
Thanks and sorry about the trouble. I’ll recommit with size_t. > On Nov 30, 2018, at 10:56 AM, Aaron Ballman wrote: > > On Fri, Nov 30, 2018 at 9:37 AM Artem Dergachev via Phabricator via > cfe-commits mailto:cfe-commits@lists.llvm.org>> > wrote: >> >> NoQ added inline comments. >> >> >>

r348023 - Updating this test, which changed after the reverts from r348020.

2018-11-30 Thread Aaron Ballman via cfe-commits
Author: aaronballman Date: Fri Nov 30 11:15:07 2018 New Revision: 348023 URL: http://llvm.org/viewvc/llvm-project?rev=348023=rev Log: Updating this test, which changed after the reverts from r348020. Modified: cfe/trunk/test/Misc/pragma-attribute-supported-attributes-list.test Modified:

[PATCH] D55085: Avoid emitting redundant or unusable directories in DIFile metadata entries

2018-11-30 Thread Paul Robinson via Phabricator via cfe-commits
probinson added inline comments. Comment at: lib/IR/DiagnosticInfo.cpp:39 #include "llvm/Support/ScopedPrinter.h" +#include "llvm/Support/raw_ostream.h" #include aprantl wrote: > probinson wrote: > > Do we use a case-sensitive sort of include files? I

Re: [PATCH] D55076: [analyzer] RetainCountChecker: recognize that OSObject can be created directly using an operator "new"

2018-11-30 Thread Aaron Ballman via cfe-commits
On Fri, Nov 30, 2018 at 9:37 AM Artem Dergachev via Phabricator via cfe-commits wrote: > > NoQ added inline comments. > > > > Comment at: clang/test/Analysis/osobject-retain-release.cpp:27 > + > + static void * operator new(unsigned long size); > + > > NoQ

r348020 - Reverting r347949-r347951 because they broke the test bots.

2018-11-30 Thread Aaron Ballman via cfe-commits
Author: aaronballman Date: Fri Nov 30 10:52:51 2018 New Revision: 348020 URL: http://llvm.org/viewvc/llvm-project?rev=348020=rev Log: Reverting r347949-r347951 because they broke the test bots.

[PATCH] D55135: [CTU][Analyzer]Add DisplayCTUProgress analyzer switch

2018-11-30 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus requested changes to this revision. Szelethus added a comment. This revision now requires changes to proceed. The idea is great! I think this should rather be an -analyzer-config flag, since the actual analysis changes with a new output (refer to `AnalyzerOption`'s doxygen comments).

[PATCH] D55023: OpenCL: Improve vector printf warnings

2018-11-30 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm marked an inline comment as done. arsenm added inline comments. Comment at: test/SemaOpenCL/printf-format-strings.cl:65 +{ +printf("%v4f\n", arg); // expected-warning {{format specifies type 'double __attribute__((ext_vector_type(4)))' but the argument has type

r348015 - [clang] Fix rL348006 for windows

2018-11-30 Thread Kadir Cetinkaya via cfe-commits
Author: kadircet Date: Fri Nov 30 10:36:31 2018 New Revision: 348015 URL: http://llvm.org/viewvc/llvm-project?rev=348015=rev Log: [clang] Fix rL348006 for windows Modified: cfe/trunk/unittests/Basic/FileManagerTest.cpp Modified: cfe/trunk/unittests/Basic/FileManagerTest.cpp URL:

[PATCH] D54905: [AddressSanitizer] Add flag to disable linking with CXX runtime

2018-11-30 Thread Evgenii Stepanov via Phabricator via cfe-commits
eugenis added a comment. >> Would turning asan operator new/delete into weak symbols help? > > The new operator is already a weak symbol in libcxx, so it looks like an ODR > violation, doesn't it? I don't think so. It's just symbol interposition. Every module in the process gets the same

[PATCH] D52879: Derive builtin return type from its definition

2018-11-30 Thread Marco Antognini via Phabricator via cfe-commits
mantognini added a comment. Please see https://reviews.llvm.org/D55136 for the patch addressing these issues. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D52879/new/ https://reviews.llvm.org/D52879 ___ cfe-commits

[PATCH] D55136: [OpenCL][Sema] Improve BuildResolvedCallExpr handling of builtins

2018-11-30 Thread Marco Antognini via Phabricator via cfe-commits
mantognini created this revision. mantognini added a reviewer: riccibruno. Herald added subscribers: cfe-commits, kristina, yaxunl. This is a follow-up on https://reviews.llvm.org/D52879, addressing a few issues. This: - adds a FIXME for later improvement for specific builtins: I previously

[PATCH] D54737: [clang-tidy] Add the abseil-duration-comparison check

2018-11-30 Thread Hyrum Wright via Phabricator via cfe-commits
hwright added a comment. Oh, and thanks for taking the time to review this. :) CHANGES SINCE LAST ACTION https://reviews.llvm.org/D54737/new/ https://reviews.llvm.org/D54737 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D55085: Avoid emitting redundant or unusable directories in DIFile metadata entries

2018-11-30 Thread Adrian Prantl via Phabricator via cfe-commits
aprantl marked an inline comment as done. aprantl added inline comments. Comment at: lib/IR/DiagnosticInfo.cpp:39 #include "llvm/Support/ScopedPrinter.h" +#include "llvm/Support/raw_ostream.h" #include probinson wrote: > Do we use a case-sensitive sort of

  1   2   3   >