Re: r305860 - Special-case handling of destructors in override lists when dumping ASTs.

2017-07-12 Thread Akira Hatanaka via cfe-commits
Hi Lang, clang crashes when I compile the following code with "-Xclang -ast-dump”: class Base { public: virtual void operator()() {} }; class Derived : public Base { public: void operator()() override {} }; If I change “OS << D->getName()” to “OS << D->getNameAsString()”, the crash

[PATCH] D34955: [Basic] Detect Git submodule version in CMake

2017-07-12 Thread Brian Gesiak via Phabricator via cfe-commits
modocache updated this revision to Diff 106367. modocache added a comment. Use CMAKE_MATCH_0 instead of using REGEX REPLACE. Thanks for the suggestion! https://reviews.llvm.org/D34955 Files: lib/Basic/CMakeLists.txt Index: lib/Basic/CMakeLists.txt

[clang-tools-extra] r307876 - clang-tools-extra/test/clang-tidy/performance-unnecessary-value-param-header.cpp: Resolve flakiness in the test.

2017-07-12 Thread NAKAMURA Takumi via cfe-commits
Author: chapuni Date: Wed Jul 12 19:06:30 2017 New Revision: 307876 URL: http://llvm.org/viewvc/llvm-project?rev=307876=rev Log: clang-tools-extra/test/clang-tidy/performance-unnecessary-value-param-header.cpp: Resolve flakiness in the test. Tests would go flaky if; 1. Using %T (not %t) 2. Put

[PATCH] D35081: [ThinLTO] Allow multiple summary entries.

2017-07-12 Thread Mehdi AMINI via Phabricator via cfe-commits
mehdi_amini added a comment. In https://reviews.llvm.org/D35081#807172, @fhahn wrote: > It's @yunlian, so if the issue you described above covers his failure, than > that's great. @tejohnson do you have time to work on a fix soon? Otherwise I > could give it a try, I would probably need a few

[PATCH] D35338: Add the -fdestroy-globals flag

2017-07-12 Thread Ian Tessier via Phabricator via cfe-commits
itessier created this revision. The -fdestroy-globals flag can be used to disable global variable destructor registration. It is intended to be used with embedded code that never exits. Disabling registration allows the linker to garbage collect unused destructors and vtables.

[PATCH] D28954: [analyzer] Add support for symbolic float expressions

2017-07-12 Thread Devin Coughlin via Phabricator via cfe-commits
dcoughlin added a comment. Thanks for the patch, and apologies for the delay reviewing! Here are some initial comments -- there are more coming. Comment at: include/clang/StaticAnalyzer/Core/PathSensitive/BasicValueFactory.h:159 +llvm::APFloat To(S,

[PATCH] D35337: [Solaris] gcc runtime dropped support for .ctors, switch to .init_array

2017-07-12 Thread Fedor Sergeev via Phabricator via cfe-commits
fedor.sergeev added a comment. Note, that LLVM has already been changed to honor use-init-array on Solaris: https://reviews.llvm.org/rL305948 (before that change setting Options.UseInitArray in clang would not matter). https://reviews.llvm.org/D35337

[PATCH] D32817: [CMake] Build runtimes for Fuchsia targets

2017-07-12 Thread Petr Hosek via Phabricator via cfe-commits
phosek updated this revision to Diff 106349. Repository: rL LLVM https://reviews.llvm.org/D32817 Files: cmake/caches/Fuchsia-stage2.cmake cmake/caches/Fuchsia.cmake Index: cmake/caches/Fuchsia.cmake === ---

[PATCH] D34301: [Sema] Make sure the definition of a referenced virtual function is emitted when it is final

2017-07-12 Thread Vedant Kumar via Phabricator via cfe-commits
vsk accepted this revision. vsk added a comment. This revision is now accepted and ready to land. Thanks, this looks great. https://reviews.llvm.org/D34301 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D35337: [Solaris] gcc runtime dropped support for .ctors, switch to .init_array

2017-07-12 Thread Fedor Sergeev via Phabricator via cfe-commits
fedor.sergeev created this revision. crtbegin.o from gcc toolchain as configured on latest Solaris (with --enable-initfini-array) does not have support for .ctors. Clang needs to switch to .init_array. Doing it unconditionally is fine since older Solaris configurations do support .init_array.

[PATCH] D34301: [Sema] Make sure the definition of a referenced virtual function is emitted when it is final

2017-07-12 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak updated this revision to Diff 106347. ahatanak marked 2 inline comments as done. ahatanak added a comment. Define and use CXXMethodDecl::getDevirtualizedMethod, which returns the function that is called when a call is devirtualized. https://reviews.llvm.org/D34301 Files:

[PATCH] D35190: __builtin_constant_p should consider the parameter of a constexpr function as constant

2017-07-12 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added a comment. See https://bugs.llvm.org/show_bug.cgi?id=4898 for more discussion of __builtin_constant_p in LLVM vs. gcc. https://reviews.llvm.org/D35190 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

r307856 - Reland "[Driver] Update Fuchsia driver path handling"

2017-07-12 Thread Petr Hosek via cfe-commits
Author: phosek Date: Wed Jul 12 15:14:41 2017 New Revision: 307856 URL: http://llvm.org/viewvc/llvm-project?rev=307856=rev Log: Reland "[Driver] Update Fuchsia driver path handling" Several improvements to the Fuchsia driver: * Search for C++ library headers and libraries in directories that

[PATCH] D35328: Reland "[Driver] Update Fuchsia driver path handling"

2017-07-12 Thread Petr Hosek via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL307856: Reland "[Driver] Update Fuchsia driver path handling" (authored by phosek). Changed prior to commit: https://reviews.llvm.org/D35328?vs=106323=106327#toc Repository: rL LLVM

r307855 - [index] Don't add relation to a NamedDecl with no name

2017-07-12 Thread Ben Langmuir via cfe-commits
Author: benlangmuir Date: Wed Jul 12 15:05:30 2017 New Revision: 307855 URL: http://llvm.org/viewvc/llvm-project?rev=307855=rev Log: [index] Don't add relation to a NamedDecl with no name Unless it's one of the special cases (tag, category) that we can handle. This syncs up the check between

[PATCH] D35328: Reland "[Driver] Update Fuchsia driver path handling"

2017-07-12 Thread Petr Hosek via Phabricator via cfe-commits
phosek updated this revision to Diff 106323. phosek marked an inline comment as done. Repository: rL LLVM https://reviews.llvm.org/D35328 Files: lib/Driver/ToolChains/Fuchsia.cpp lib/Driver/ToolChains/Fuchsia.h test/Driver/fuchsia.c test/Driver/fuchsia.cpp Index:

[PATCH] D28953: [analyzer] Eliminate analyzer limitations on symbolic constraint generation

2017-07-12 Thread Dominic Chen via Phabricator via cfe-commits
ddcc added a comment. Reverted in https://reviews.llvm.org/rL307853 Repository: rL LLVM https://reviews.llvm.org/D28953 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D28953: [analyzer] Eliminate analyzer limitations on symbolic constraint generation

2017-07-12 Thread Dominic Chen via Phabricator via cfe-commits
ddcc added a comment. Reverted in https://reviews.llvm.org/rL307853 Repository: rL LLVM https://reviews.llvm.org/D28953 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D35159: [libcxxabi][demangler] Use an AST to represent the demangled name

2017-07-12 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added a comment. +1 for moving this file to LLVM's internal style. Comment at: src/cxa_demangle.cpp:44 +class string_ref +{ dexonsmith wrote: > mehdi_amini wrote: > > dexonsmith wrote: > > > erik.pilkington wrote: > > > > mehdi_amini wrote: > > > > >

r307853 - Revert "[analyzer] Support generating and reasoning over more symbolic constraint types"

2017-07-12 Thread Dominic Chen via cfe-commits
Author: ddcc Date: Wed Jul 12 14:43:42 2017 New Revision: 307853 URL: http://llvm.org/viewvc/llvm-project?rev=307853=rev Log: Revert "[analyzer] Support generating and reasoning over more symbolic constraint types" Assertion `Loc::isLocType(SSE->getLHS()->getType())' failed in Analysis/PR3991.m

[PATCH] D35268: [ObjC] Ambiguous property synthesis should pick the 'readwrite' property and check for incompatible attributes

2017-07-12 Thread John McCall via Phabricator via cfe-commits
rjmccall accepted this revision. rjmccall added a comment. This revision is now accepted and ready to land. This all seems reasonable. LGTM. Repository: rL LLVM https://reviews.llvm.org/D35268 ___ cfe-commits mailing list

[PATCH] D28953: [analyzer] Eliminate analyzer limitations on symbolic constraint generation

2017-07-12 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse added a comment. r307833 is causing the sanitizer-x86_64-linux-fast buildbot to fail during clang regression tests with the following error: clang:

[PATCH] D35329: [clang-reorder-fields] Enable reordering for plain C structs

2017-07-12 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexshap created this revision. This diff adds support for reordering fields in structs when the code compiles as plain C, in particular we switch to using RecordDecl instead of CXXRecordDecl where it's appropriate. Test plan: make check-all Repository: rL LLVM

[PATCH] D35328: Reland "[Driver] Update Fuchsia driver path handling"

2017-07-12 Thread Jonathan Roelofs via Phabricator via cfe-commits
jroelofs accepted this revision. jroelofs added inline comments. This revision is now accepted and ready to land. Comment at: lib/Driver/ToolChains/Fuchsia.cpp:134 +static std::string computeTriple(llvm::Triple Triple) { + SmallString<64> T; `normalizeTriple`

[PATCH] D32817: [CMake] Build runtimes for Fuchsia targets

2017-07-12 Thread Petr Hosek via Phabricator via cfe-commits
phosek updated this revision to Diff 106311. Repository: rL LLVM https://reviews.llvm.org/D32817 Files: cmake/caches/Fuchsia-stage2.cmake cmake/caches/Fuchsia.cmake Index: cmake/caches/Fuchsia.cmake === ---

[PATCH] D35081: [ThinLTO] Allow multiple summary entries.

2017-07-12 Thread Florian Hahn via Phabricator via cfe-commits
fhahn added a comment. It's @yunlian, so if the issue you described above covers his failure, than that's great. @tejohnson do you have time to work on a fix soon? Otherwise I could give it a try, I would probably need a few pointers though, as I am not really familiar with ThinLTO. Passing

[PATCH] D35328: Reland "[Driver] Update Fuchsia driver path handling"

2017-07-12 Thread Petr Hosek via Phabricator via cfe-commits
phosek added a comment. I have fixed the test to also handle Windows paths properly which was causing a build breakage. Repository: rL LLVM https://reviews.llvm.org/D35328 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D35328: Reland "[Driver] Update Fuchsia driver path handling"

2017-07-12 Thread Petr Hosek via Phabricator via cfe-commits
phosek created this revision. Several improvements to the Fuchsia driver: - Search for C++ library headers and libraries in directories that are part of the toolchain distribution rather than sysroot. - Use LLVM support utlities to construct paths to make sure the driver is also usable on

[PATCH] D35254: [mips][mt][7/7] Add driver option for the MIPS MT ASE.

2017-07-12 Thread Simon Dardis via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL307847: [mips][mt][7/7] Add driver option for the MIPS MT ASE. (authored by sdardis). Repository: rL LLVM https://reviews.llvm.org/D35254 Files: cfe/trunk/include/clang/Driver/Options.td

r307847 - [mips][mt][7/7] Add driver option for the MIPS MT ASE.

2017-07-12 Thread Simon Dardis via cfe-commits
Author: sdardis Date: Wed Jul 12 14:13:05 2017 New Revision: 307847 URL: http://llvm.org/viewvc/llvm-project?rev=307847=rev Log: [mips][mt][7/7] Add driver option for the MIPS MT ASE. Reviewers: atanasyan, slthakur Differential Revision: https://reviews.llvm.org/D35254 Modified:

[PATCH] D35081: [ThinLTO] Allow multiple summary entries.

2017-07-12 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson added a comment. In https://reviews.llvm.org/D35081#805761, @yunlian wrote: > I've sent a reproduce test case to tejohnson. FYI I tracked down what is going on here and reproduced with a small test case. Essentially, two copies of a linkonce odr function were optimized somewhat

r307845 - Revert "[Driver] Update Fuchsia driver path handling"

2017-07-12 Thread Petr Hosek via cfe-commits
Author: phosek Date: Wed Jul 12 14:03:54 2017 New Revision: 307845 URL: http://llvm.org/viewvc/llvm-project?rev=307845=rev Log: Revert "[Driver] Update Fuchsia driver path handling" The tests are failing on Windows. This reverts commit 429fe8229496f639df6b0b4734beedb1d4317aa5. Modified:

[PATCH] D35159: [libcxxabi][demangler] Use an AST to represent the demangled name

2017-07-12 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington added a comment. > Looks like this demangler's design is similar to my demangler for Microsoft > name mangling scheme (https://reviews.llvm.org/D34667). Is that a > coincidence? Both demanglers create AST, stringize it using > print_left/print_right (I named them

[PATCH] D35159: [libcxxabi][demangler] Use an AST to represent the demangled name

2017-07-12 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added a reviewer: mclow.lists. dexonsmith added a subscriber: mclow.lists. dexonsmith added a comment. +mclow.lists Comment at: src/cxa_demangle.cpp:44 +class string_ref +{ mehdi_amini wrote: > dexonsmith wrote: > > erik.pilkington wrote: > > >

[PATCH] D35159: [libcxxabi][demangler] Use an AST to represent the demangled name

2017-07-12 Thread Mehdi AMINI via Phabricator via cfe-commits
mehdi_amini added a comment. In https://reviews.llvm.org/D35159#807075, @dexonsmith wrote: > This LGTM. Mehdi, do you have any other concerns? No other concern (haven't looked further for any either) https://reviews.llvm.org/D35159 ___

[PATCH] D35159: [libcxxabi][demangler] Use an AST to represent the demangled name

2017-07-12 Thread Rui Ueyama via Phabricator via cfe-commits
ruiu added a comment. Looks like this demangler's design is similar to my demangler for Microsoft name mangling scheme (https://reviews.llvm.org/D34667). Is that a coincidence? Both demanglers create AST, stringize it using print_left/print_right (I named them write_pre/write_post), and use

[PATCH] D35159: [libcxxabi][demangler] Use an AST to represent the demangled name

2017-07-12 Thread Mehdi AMINI via Phabricator via cfe-commits
mehdi_amini added inline comments. Comment at: src/cxa_demangle.cpp:44 +class string_ref +{ dexonsmith wrote: > erik.pilkington wrote: > > mehdi_amini wrote: > > > If this is supposed to be *the* ultimate LLVM demangler, can we follow > > > LLVM coding

[PATCH] D35159: [libcxxabi][demangler] Use an AST to represent the demangled name

2017-07-12 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added a comment. This LGTM. Mehdi, do you have any other concerns? Comment at: src/cxa_demangle.cpp:44 +class string_ref +{ erik.pilkington wrote: > mehdi_amini wrote: > > If this is supposed to be *the* ultimate LLVM demangler, can we follow

r307838 - [DOXYGEN] Corrected typos and incorrect parameters description.

2017-07-12 Thread Ekaterina Romanova via cfe-commits
Author: kromanova Date: Wed Jul 12 13:18:55 2017 New Revision: 307838 URL: http://llvm.org/viewvc/llvm-project?rev=307838=rev Log: [DOXYGEN] Corrected typos and incorrect parameters description. Corrected several typos and incorrect parameters description that Sony 's techinical writer found

[PATCH] D33645: [analyzer] Add missing documentation for static analyzer checkers

2017-07-12 Thread Dominik Szabó via Phabricator via cfe-commits
szdominik added a comment. In https://reviews.llvm.org/D33645#806852, @dcoughlin wrote: > Do you have commit access, or do you need someone to commit it for you? Thank you. I don't have, I'm quite new at this project. :) https://reviews.llvm.org/D33645

[PATCH] D28953: [analyzer] Eliminate analyzer limitations on symbolic constraint generation

2017-07-12 Thread Dominic Chen via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL307833: [analyzer] Support generating and reasoning over more symbolic constraint types (authored by ddcc). Changed prior to commit: https://reviews.llvm.org/D28953?vs=106084=106284#toc Repository:

r307833 - [analyzer] Support generating and reasoning over more symbolic constraint types

2017-07-12 Thread Dominic Chen via cfe-commits
Author: ddcc Date: Wed Jul 12 12:37:57 2017 New Revision: 307833 URL: http://llvm.org/viewvc/llvm-project?rev=307833=rev Log: [analyzer] Support generating and reasoning over more symbolic constraint types Summary: Generate more IntSymExpr constraints, perform SVal simplification for IntSymExpr

[PATCH] D34121: [ubsan] Teach the pointer overflow check that "p - <= p" (PR33430)

2017-07-12 Thread Vedant Kumar via Phabricator via cfe-commits
vsk added a comment. @dtzWill do you have any further comments on this one? I'd like to get another 'lgtm' before committing, and it'd be nice to get this in before llvm 5.0 branches (7/19). FWIW we've been living on this for a few weeks internally without any issues:

[PATCH] D32613: [Driver] Update Fuchsia driver path handling

2017-07-12 Thread Petr Hosek via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL307830: [Driver] Update Fuchsia driver path handling (authored by phosek). Changed prior to commit: https://reviews.llvm.org/D32613?vs=106275=106276#toc Repository: rL LLVM

r307830 - [Driver] Update Fuchsia driver path handling

2017-07-12 Thread Petr Hosek via cfe-commits
Author: phosek Date: Wed Jul 12 12:15:51 2017 New Revision: 307830 URL: http://llvm.org/viewvc/llvm-project?rev=307830=rev Log: [Driver] Update Fuchsia driver path handling Several improvements to the Fuchsia driver: * Search for C++ library headers and libraries in directories that are part of

[PATCH] D32613: [Driver] Update Fuchsia driver path handling

2017-07-12 Thread Petr Hosek via Phabricator via cfe-commits
phosek updated this revision to Diff 106275. Repository: rL LLVM https://reviews.llvm.org/D32613 Files: lib/Driver/ToolChains/Fuchsia.cpp lib/Driver/ToolChains/Fuchsia.h test/Driver/fuchsia.cpp Index: test/Driver/fuchsia.cpp

[PATCH] D32700: [clang-tidy] Add bugprone-suspicious-memset-usage check.

2017-07-12 Thread Reka Kovacs via Phabricator via cfe-commits
rnkovacs updated this revision to Diff 106268. rnkovacs added a comment. Herald added a subscriber: baloghadamsoftware. - Added `char[]` exception along with a test case. There are no more false positives on LLVM. - Simplified fix-its by using `clang::tooling::fixit` functions.

[PATCH] D34301: [Sema] Make sure the definition of a referenced virtual function is emitted when it is final

2017-07-12 Thread Vedant Kumar via Phabricator via cfe-commits
vsk added a comment. I suggest changing the API for 'canDevirtualizeCall' a bit but this is looking great overall. The code movement and test case changes look good. Comment at: include/clang/AST/DeclCXX.h:1902 + bool canDevirtualizeCall(const Expr *Base, bool IsAppleKext, +

[PATCH] D35082: [OpenCL] Add LangAS::opencl_private to represent private address space in AST

2017-07-12 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: lib/AST/Expr.cpp:3235 +// has non-default address space it is not treated as nullptr. +bool PointeeHasDefaultAS = false; +if (Ctx.getLangOpts().OpenCL) Would we still be accepting the

r307822 - [OPENMP] Emit implicit taskgroup block around taskloop directives.

2017-07-12 Thread Alexey Bataev via cfe-commits
Author: abataev Date: Wed Jul 12 11:09:32 2017 New Revision: 307822 URL: http://llvm.org/viewvc/llvm-project?rev=307822=rev Log: [OPENMP] Emit implicit taskgroup block around taskloop directives. If taskloop directive has no associated nogroup clause, it must emitted inside implicit taskgroup

[PATCH] D33645: [analyzer] Add missing documentation for static analyzer checkers

2017-07-12 Thread Devin Coughlin via Phabricator via cfe-commits
dcoughlin accepted this revision. dcoughlin added a comment. This revision is now accepted and ready to land. LGTM. Thanks! Do you have commit access, or do you need someone to commit it for you? https://reviews.llvm.org/D33645 ___ cfe-commits

[PATCH] D34913: [clang-tidy] Add a new Android check "android-cloexec-socket"

2017-07-12 Thread Yan Wang via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL307818: [clang-tidy] Add a new Android check "android-cloexec-socket" (authored by yawanng). Changed prior to commit: https://reviews.llvm.org/D34913?vs=106058=106252#toc Repository: rL LLVM

[clang-tools-extra] r307818 - [clang-tidy] Add a new Android check "android-cloexec-socket"

2017-07-12 Thread Yan Wang via cfe-commits
Author: yawanng Date: Wed Jul 12 10:43:36 2017 New Revision: 307818 URL: http://llvm.org/viewvc/llvm-project?rev=307818=rev Log: [clang-tidy] Add a new Android check "android-cloexec-socket" Summary: socket() is better to include SOCK_CLOEXEC in its type argument to avoid the file descriptor

[PATCH] D34913: [clang-tidy] Add a new Android check "android-cloexec-socket"

2017-07-12 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. In https://reviews.llvm.org/D34913#806799, @yawanng wrote: > In https://reviews.llvm.org/D34913#797577, @Eugene.Zelenko wrote: > > > Please wait for Alexander, Aaron or Haojian approval. > > > Could you please check this CL? Thank you. You could commit changes,

[PATCH] D34913: [clang-tidy] Add a new Android check "android-cloexec-socket"

2017-07-12 Thread Yan Wang via Phabricator via cfe-commits
yawanng added a comment. In https://reviews.llvm.org/D34913#797577, @Eugene.Zelenko wrote: > Please wait for Alexander, Aaron or Haojian approval. Could you please check this CL? Thank you. https://reviews.llvm.org/D34913 ___ cfe-commits mailing

[PATCH] D34275: [analyzer] Re-implemente current virtual calls checker in a path-sensitive way

2017-07-12 Thread wangxin via Phabricator via cfe-commits
wangxindsb updated this revision to Diff 106243. wangxindsb added a comment. - Change function name to start with a lower case letter. - Use `StringRef` instead of `const char * ' for ReportBug() const. - Correct the braces for single statement blocks. https://reviews.llvm.org/D34275 Files:

[PATCH] D35306: [diagtool] Add the 'find-diagnostic-id' subcommand that converts a name of the diagnostic to its enum value

2017-07-12 Thread Alex Lorenz via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL307813: [diagtool] Add a 'find-diagnostic-id' subcommand that converts a name of (authored by arphaman). Changed prior to commit: https://reviews.llvm.org/D35306?vs=106211=106245#toc Repository: rL

r307813 - [diagtool] Add a 'find-diagnostic-id' subcommand that converts a name of

2017-07-12 Thread Alex Lorenz via cfe-commits
Author: arphaman Date: Wed Jul 12 09:41:49 2017 New Revision: 307813 URL: http://llvm.org/viewvc/llvm-project?rev=307813=rev Log: [diagtool] Add a 'find-diagnostic-id' subcommand that converts a name of the diagnostic to its enum value This will be used by a script that invokes clang in a

[PATCH] D31700: [clang-tidy] Ignore blank spaces between cast's ")" and its sub expr.

2017-07-12 Thread Haojian Wu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL307812: [clang-tidy] Ignore blank spaces between cast's ")" and its sub expr. (authored by hokein). Repository: rL LLVM https://reviews.llvm.org/D31700 Files:

[clang-tools-extra] r307812 - [clang-tidy] Ignore blank spaces between cast's ")" and its sub expr.

2017-07-12 Thread Haojian Wu via cfe-commits
Author: hokein Date: Wed Jul 12 09:38:59 2017 New Revision: 307812 URL: http://llvm.org/viewvc/llvm-project?rev=307812=rev Log: [clang-tidy] Ignore blank spaces between cast's ")" and its sub expr. Summary: Before the change: `auto i = (Enum) 5;` => `auto i = static_cast( 5);` After the

[PATCH] D32478: [clang-format] Fix AlignOperands when BreakBeforeBinaryOperators is set

2017-07-12 Thread Francois Ferrand via Phabricator via cfe-commits
Typz added a comment. I renamed the option to `AlignAfterOperator`, is it acceptable now? (I also thought of `UnindentOperator`, but I think it is better to keep the notion of alignment) Note that this style is used in multiple open-source projects: Skia , parts of QtCreator

[PATCH] D35225: [clang-tidy] add regression test to performance-unnecessary-value-param

2017-07-12 Thread Chih-Hung Hsieh via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL307810: [clang-tidy] add regression test to performance-unnecessary-value-param (authored by chh). Changed prior to commit: https://reviews.llvm.org/D35225?vs=106064=106241#toc Repository: rL LLVM

[clang-tools-extra] r307810 - [clang-tidy] add regression test to performance-unnecessary-value-param

2017-07-12 Thread Chih-Hung Hsieh via cfe-commits
Author: chh Date: Wed Jul 12 09:27:00 2017 New Revision: 307810 URL: http://llvm.org/viewvc/llvm-project?rev=307810=rev Log: [clang-tidy] add regression test to performance-unnecessary-value-param This test shows the problem in https://bugs.llvm.org/show_bug.cgi?id=33734 Differential Revision:

r307809 - [clang] buildFixItInsertionLine should use Hints of the same FID and LineNo

2017-07-12 Thread Chih-Hung Hsieh via cfe-commits
Author: chh Date: Wed Jul 12 09:25:40 2017 New Revision: 307809 URL: http://llvm.org/viewvc/llvm-project?rev=307809=rev Log: [clang] buildFixItInsertionLine should use Hints of the same FID and LineNo Fix bug https://bugs.llvm.org/show_bug.cgi?id=33734 Differential Revision:

[PATCH] D35230: [clang] buildFixItInsertionLine should use Hints of the same FID and LineNo

2017-07-12 Thread Chih-Hung Hsieh via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL307809: [clang] buildFixItInsertionLine should use Hints of the same FID and LineNo (authored by chh). Changed prior to commit: https://reviews.llvm.org/D35230?vs=105937=106240#toc Repository: rL

[PATCH] D35118: [AArch64] Add support for handling the +sve target feature

2017-07-12 Thread Renato Golin via Phabricator via cfe-commits
rengolin added a reviewer: jmolloy. rengolin added a subscriber: jmolloy. rengolin added a comment. @jmolloy Can you check this change, please? Comment at: lib/Basic/Targets.cpp:6245 enum FPUModeEnum { -FPUMode, -NeonMode +NeonMode = (1 << 0), +SveMode = (1

[PATCH] D31700: [clang-tidy] Ignore blank spaces between cast's ")" and its sub expr.

2017-07-12 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh accepted this revision. alexfh added a comment. LG. Thanks! https://reviews.llvm.org/D31700 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D35051: [clang-tidy] Add bugprone-undefined-memory-manipulation check.

2017-07-12 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh accepted this revision. alexfh added a comment. This revision is now accepted and ready to land. LG Comment at: clang-tidy/bugprone/UndefinedMemoryManipulationCheck.cpp:39 + // Check whether source object is not TriviallyCopyable. + // Only applicable to memcpy() and

[PATCH] D35051: [clang-tidy] Add bugprone-undefined-memory-manipulation check.

2017-07-12 Thread Reka Kovacs via Phabricator via cfe-commits
rnkovacs marked 2 inline comments as done. rnkovacs added inline comments. Comment at: clang-tidy/bugprone/UndefinedMemoryManipulationCheck.cpp:39 + // Check whether source object is not TriviallyCopyable. + // Only applicable to memcpy() and memmove(). + Finder->addMatcher(

[PATCH] D33719: Add _Float16 as a C/C++ source language type

2017-07-12 Thread Sjoerd Meijer via Phabricator via cfe-commits
SjoerdMeijer updated this revision to Diff 106228. SjoerdMeijer added a comment. This fixes: - type mangling for `_Float16` (approved here: https://github.com/itanium-cxx-abi/cxx-abi/pull/22, but not yet committed. ) - removed the argument promotion for `_Float16` that I added because it turns

[PATCH] D35051: [clang-tidy] Add bugprone-undefined-memory-manipulation check.

2017-07-12 Thread Reka Kovacs via Phabricator via cfe-commits
rnkovacs updated this revision to Diff 106234. rnkovacs added a comment. Herald added a subscriber: baloghadamsoftware. Removed redundant parens and stray semicolons. https://reviews.llvm.org/D35051 Files: clang-tidy/bugprone/BugproneTidyModule.cpp clang-tidy/bugprone/CMakeLists.txt

[PATCH] D35306: [diagtool] Add the 'find-diagnostic-id' subcommand that converts a name of the diagnostic to its enum value

2017-07-12 Thread don hinton via Phabricator via cfe-commits
hintonda accepted this revision. hintonda added a comment. This revision is now accepted and ready to land. LGTM. Category ids' might be useful, but I'd wait until someone actually needs them. Repository: rL LLVM https://reviews.llvm.org/D35306

Re: [clang-tools-extra] r307701 - Fix clang-tidy diagnostic.cpp test on Windows

2017-07-12 Thread Alexander Kornienko via cfe-commits
Thank you! On Tue, Jul 11, 2017 at 10:22 PM, Reid Kleckner via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Author: rnk > Date: Tue Jul 11 13:22:17 2017 > New Revision: 307701 > > URL: http://llvm.org/viewvc/llvm-project?rev=307701=rev > Log: > Fix clang-tidy diagnostic.cpp test on Windows

[PATCH] D32700: [clang-tidy] Add bugprone-suspicious-memset-usage check.

2017-07-12 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added inline comments. Comment at: clang-tidy/bugprone/SuspiciousMemsetUsageCheck.cpp:127-130 +SourceRange LHSRange = FillChar->getSourceRange(); +SourceRange RHSRange = ByteCount->getSourceRange(); +StringRef RHSString = getAsString(Result, RHSRange); +

[PATCH] D35051: [clang-tidy] Add bugprone-undefined-memory-manipulation check.

2017-07-12 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh requested changes to this revision. alexfh added inline comments. This revision now requires changes to proceed. Comment at: clang-tidy/bugprone/UndefinedMemoryManipulationCheck.cpp:22 +AST_MATCHER(CXXRecordDecl, isNotTriviallyCopyable) { + return

r307795 - [clang-format] Keep level of comment before an empty line

2017-07-12 Thread Krasimir Georgiev via cfe-commits
Author: krasimir Date: Wed Jul 12 08:21:43 2017 New Revision: 307795 URL: http://llvm.org/viewvc/llvm-project?rev=307795=rev Log: [clang-format] Keep level of comment before an empty line Summary: This patch fixes bug https://bugs.llvm.org/show_bug.cgi?id=3313: a comment line was aligned with

[PATCH] D35296: [clang-format] Keep level of comment before an empty line

2017-07-12 Thread Krasimir Georgiev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL307795: [clang-format] Keep level of comment before an empty line (authored by krasimir). Repository: rL LLVM https://reviews.llvm.org/D35296 Files: cfe/trunk/lib/Format/TokenAnnotator.cpp

[PATCH] D32478: [clang-format] Fix AlignOperands when BreakBeforeBinaryOperators is set

2017-07-12 Thread Francois Ferrand via Phabricator via cfe-commits
Typz updated this revision to Diff 106221. Typz marked 3 inline comments as done. Typz added a comment. Rename option to AlignAfterOperator https://reviews.llvm.org/D32478 Files: include/clang/Format/Format.h lib/Format/ContinuationIndenter.cpp lib/Format/ContinuationIndenter.h

[PATCH] D35296: [clang-format] Keep level of comment before an empty line

2017-07-12 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir updated this revision to Diff 106220. krasimir marked 2 inline comments as done. krasimir added a comment. - Address review comments https://reviews.llvm.org/D35296 Files: lib/Format/TokenAnnotator.cpp unittests/Format/FormatTest.cpp unittests/Format/FormatTestComments.cpp

[PATCH] D31700: [clang-tidy] Ignore blank spaces between cast's ")" and its sub expr.

2017-07-12 Thread Haojian Wu via Phabricator via cfe-commits
hokein added a comment. > You might want to commit this at some point ;] I somewhat forgot this minor patch. Comment at: clang-tidy/google/AvoidCStyleCastsCheck.cpp:139 ")"); + ReplaceRange = CharSourceRange::getCharRange(CastExpr->getLParenLoc(), +

[PATCH] D31700: [clang-tidy] Ignore blank spaces between cast's ")" and its sub expr.

2017-07-12 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 106219. hokein marked an inline comment as done. hokein added a comment. Herald added subscribers: xazax.hun, JDevlieghere. Support more cases. https://reviews.llvm.org/D31700 Files: clang-tidy/google/AvoidCStyleCastsCheck.cpp

[PATCH] D35296: [clang-format] Keep level of comment before an empty line

2017-07-12 Thread Daniel Jasper via Phabricator via cfe-commits
djasper accepted this revision. djasper added a comment. This revision is now accepted and ready to land. Some small comments, otherwise looks good. Comment at: lib/Format/TokenAnnotator.cpp:1706 +if (NextNonCommentLine && CommentLine) { + bool UpdateLevel =

[PATCH] D34275: [analyzer] Re-implemente current virtual calls checker in a path-sensitive way

2017-07-12 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added a comment. Thank you! I think we can start to run this check on real world code bases and evaluate the results. Comment at: lib/StaticAnalyzer/Checkers/VirtualCallChecker.cpp:41 + void checkPreCall(const CallEvent , CheckerContext ) const; + void

[PATCH] D35306: [diagtool] Add the 'find-diagnostic-id' subcommand that converts a name of the diagnostic to its enum value

2017-07-12 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman created this revision. Herald added a subscriber: mgorny. The new subcommand prints out the enum value of the diagnostic. This will be used in a utility script that invokes clang and forces it to stop when some specific diagnostic is emitted (see https://reviews.llvm.org/D35175 for

Re: [clang-tools-extra] r303735 - Modify test so that it looks for patterns in stderr as well

2017-07-12 Thread David Blaikie via cfe-commits
Thanks all! On Wed, Jul 12, 2017 at 7:46 AM Alexander Kornienko wrote: > Done in r307661. > > On Mon, Jul 10, 2017 at 2:08 PM, Alexander Kornienko > wrote: > >> Benjamin has actually fixed the issue by reverting to the old behavior in >> r306822. >> I'll

[PATCH] D34949: [refactor][rename] Use a single base class for class that finds a declaration at location and for class that searches for all occurrences of a specific declaration

2017-07-12 Thread Haojian Wu via Phabricator via cfe-commits
hokein accepted this revision. hokein added a comment. LGTM. Comment at: include/clang/Tooling/Refactoring/RecursiveSymbolVisitor.h:33 +: public RecursiveASTVisitor { + using BaseType = RecursiveASTVisitor; + const

Re: [clang-tools-extra] r303735 - Modify test so that it looks for patterns in stderr as well

2017-07-12 Thread Alexander Kornienko via cfe-commits
Done in r307661. On Mon, Jul 10, 2017 at 2:08 PM, Alexander Kornienko wrote: > Benjamin has actually fixed the issue by reverting to the old behavior in > r306822. > I'll add a test for this behavior anyway. > > On Mon, Jul 10, 2017 at 11:47 AM, Alexander Kornienko

[PATCH] D35175: New option that adds the DiagID enum name and index to Diagnostic output.

2017-07-12 Thread don hinton via Phabricator via cfe-commits
hintonda added a comment. Great, thanks... https://reviews.llvm.org/D35175 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D34275: [analyzer] Re-implemente current virtual calls checker in a path-sensitive way

2017-07-12 Thread wangxin via Phabricator via cfe-commits
wangxindsb updated this revision to Diff 106204. wangxindsb added a comment. - Change IsVirtualCall(const CallExpr *CE) to be a free static function. - Rename some variables. - Improve the BugReporterVisitor, enclose the declaration names in single quotes. - Hoist getSValBuilder() from the if

[PATCH] D35175: New option that adds the DiagID enum name and index to Diagnostic output.

2017-07-12 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added a comment. I was impatient, so I already started on a patch for diagtool. I'll post it soon. https://reviews.llvm.org/D35175 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D35175: New option that adds the DiagID enum name and index to Diagnostic output.

2017-07-12 Thread don hinton via Phabricator via cfe-commits
hintonda added a comment. I'd be happy to do that if it would help. If so, should I do it here create a new diff? Perhaps we might even make sense add the ability to pass in a message and find the matching name/index. https://reviews.llvm.org/D35175

[PATCH] D35190: __builtin_constant_p should consider the parameter of a constexpr function as constant

2017-07-12 Thread Olivier Goffart via Phabricator via cfe-commits
ogoffart added a comment. > What if the constexpr function is called with in a non-constexpr context, > e.g. with a random global variable as argument? __builtin_constant_p will still return false in this case, contrary to gcc (whose behavior actually depends on the optimization level). I

[PATCH] D34949: [refactor][rename] Use a single base class for class that finds a declaration at location and for class that searches for all occurrences of a specific declaration

2017-07-12 Thread Manuel Klimek via Phabricator via cfe-commits
klimek accepted this revision. klimek added a comment. This revision is now accepted and ready to land. lg Repository: rL LLVM https://reviews.llvm.org/D34949 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D31805: [clang-tidy] Mention "add the check to release note" in add_new_check.py.

2017-07-12 Thread Haojian Wu via Phabricator via cfe-commits
hokein abandoned this revision. hokein added a comment. > Good idea. Implemented in r307787. No alphabetic order though. Feel free to > fix ;) Looks good. Thanks! Closing this revision. Repository: rL LLVM https://reviews.llvm.org/D31805 ___

[PATCH] D33644: Add default values for function parameter chunks

2017-07-12 Thread Manuel Klimek via Phabricator via cfe-commits
klimek added a reviewer: rsmith. klimek added a comment. +Richard, as apparently we get the source ranges for default values of built-in types without the preceding "=", but for user-defined types including the preceding "=" - is that intentional? Comment at:

[PATCH] D35296: [clang-format] Keep level of comment before an empty line

2017-07-12 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir updated this revision to Diff 106205. krasimir added a comment. - Update switch tests https://reviews.llvm.org/D35296 Files: lib/Format/TokenAnnotator.cpp unittests/Format/FormatTest.cpp unittests/Format/FormatTestComments.cpp Index: unittests/Format/FormatTestComments.cpp

[PATCH] D34949: [refactor][rename] Use a single base class for class that finds a declaration at location and for class that searches for all occurrences of a specific declaration

2017-07-12 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added a comment. Ping. Repository: rL LLVM https://reviews.llvm.org/D34949 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D34512: Add preliminary Cross Translation Unit support library

2017-07-12 Thread Manuel Klimek via Phabricator via cfe-commits
klimek added a comment. Yep, I want Richard's approval for the name. I think he already expressed a pro-pulling-out stance. https://reviews.llvm.org/D34512 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D34512: Add preliminary Cross Translation Unit support library

2017-07-12 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added a comment. In https://reviews.llvm.org/D34512#803724, @klimek wrote: > Specifically, ping Richard for new top-level lib in clang. Richard proposed pulling this out into a separate library in the first place. Do we need his approval for the name? Or we want him to consider if

[PATCH] D35296: [clang-format] Keep level of comment before an empty line

2017-07-12 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir updated this revision to Diff 106202. krasimir added a comment. - Switch to original column-based detection https://reviews.llvm.org/D35296 Files: lib/Format/TokenAnnotator.cpp unittests/Format/FormatTestComments.cpp Index: unittests/Format/FormatTestComments.cpp

  1   2   >