[PATCH] D37956: [libc++] Check back reference subscript overflow in a single place.

2017-09-16 Thread Tim Shen via Phabricator via cfe-commits
timshen created this revision. Herald added a subscriber: sanjoy. Herald added a reviewer: EricWF. Currently it's checked in three places, including one place that's at regex runtime. There is no need to do runtime check, as all uses and definitions of subexpress is known at regex compile-time.

[PATCH] D37955: [libcxx] Fix invert negative bracket match.

2017-09-16 Thread Tim Shen via Phabricator via cfe-commits
timshen updated this revision to Diff 115554. timshen added a comment. Remove "#include " in the test. It was for debugging. https://reviews.llvm.org/D37955 Files: libcxx/include/regex libcxx/test/std/re/re.alg/re.alg.search/invert_neg_word_search.pass.cpp Index: libcxx/test/std/re/re.alg

[PATCH] D37955: [libcxx] Fix invert negative bracket match.

2017-09-16 Thread Tim Shen via Phabricator via cfe-commits
timshen created this revision. Herald added a subscriber: sanjoy. Herald added a reviewer: EricWF. Ideally we want !(neg_mask || neg_char), aka (!neg_mask && !neg_char). Before the change, the code is (!neg_mask || !neg_char). This fixes PR34310. https://reviews.llvm.org/D37955 Files: libcx

[PATCH] D37954: Expand absolute system header paths when using -MD depfiles

2017-09-16 Thread Peter Wu via Phabricator via cfe-commits
Lekensteyn added a comment. I tried to contact Simon (the author of the GCC) patch with a question about the -fno-canonical-system-headers, but his Google address is bouncing. GCC has long survived with doing this by default, I wonder if this option could just me omitted, enabling the feature b

[PATCH] D37954: Expand absolute system header paths when using -MD depfiles

2017-09-16 Thread Peter Wu via Phabricator via cfe-commits
Lekensteyn created this revision. Herald added a subscriber: klimek. GCC defaults to expanding the dependencies in depfiles, resolving components like ".." and symlinks. Mimic this feature to ensure that the Ninja build tool detects the correct dependencies when a symlink changes directory levels,

Re: r313315 - Diagnostic specific failed condition in a static_assert.

2017-09-16 Thread Richard Smith via cfe-commits
This is a bug in the libc++ tests. It's OK for them to check that the static_assert message is produced, but not that they're prefixed with the exact string "static_assert failed:". On 16 September 2017 at 05:54, NAKAMURA Takumi via cfe-commits < cfe-commits@lists.llvm.org> wrote: > This triggere

[PATCH] D36836: [clang-tidy] Implement readability-function-cognitive-complexity check

2017-09-16 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added inline comments. Comment at: clang-tidy/readability/FunctionCognitiveComplexityCheck.cpp:102-114 +const std::array CognitiveComplexity::Msgs = {{ +// B1 + B2 + B3 +"+%0, including nesting penalty of %1, nesting level increased to %2", + +// B1 + B2 +

[PATCH] D36836: [clang-tidy] Implement readability-function-cognitive-complexity check

2017-09-16 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri updated this revision to Diff 115547. lebedev.ri marked 13 inline comments as done. lebedev.ri added a comment. Address even more @JonasToth's review notes. - Fixed docs - Validated the implementation (the testcase) against the "reference" implementation - Fixed discrepancies in the i

[PATCH] D37891: Driver: hoist the `wchar_t` handling to the driver

2017-09-16 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd added inline comments. Comment at: lib/CodeGen/CodeGenModule.cpp:477 Context.getTypeSizeInChars(Context.getWideCharType()).getQuantity(); - assert((LangOpts.ShortWChar || - llvm::TargetLibraryInfoImpl::getTargetWCharSize(Target.getTriple()) == -

[PATCH] D32210: [Sema][ObjC] Add support for attribute "noescape"

2017-09-16 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. Thanks, that looks good. https://reviews.llvm.org/D32210 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libunwind] r313470 - Fix a typo in the documentation. NFC.

2017-09-16 Thread Martin Storsjo via cfe-commits
Author: mstorsjo Date: Sat Sep 16 13:52:05 2017 New Revision: 313470 URL: http://llvm.org/viewvc/llvm-project?rev=313470&view=rev Log: Fix a typo in the documentation. NFC. Modified: libunwind/trunk/docs/index.rst Modified: libunwind/trunk/docs/index.rst URL: http://llvm.org/viewvc/llvm-pro

Re: [PATCH] D33514: [WIP] Bug 32352 - Provide a way for OptimizationRemarkEmitter::allowExtraAnalysis to check if (specific) remarks are enabled

2017-09-16 Thread vivek pandya via cfe-commits
Thanks for doing this! It has been long time I work on big change for LLVM so sorry for forgetting that. On Saturday, September 16, 2017, NAKAMURA Takumi via Phabricator < revi...@reviews.llvm.org> wrote: > chapuni added a comment. > > Fixed in https://reviews.llvm.org/rL313456. > > > > =

[PATCH] D37938: [X86] Remove unnecessary extra encodings from the CPU name enum in clang

2017-09-16 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL313462: [X86] Remove unnecessary extra encodings from the CPU name enum in clang (authored by ctopper). Changed prior to commit: https://reviews.llvm.org/D37938?vs=115512&id=115540#toc Repository: rL

r313462 - [X86] Remove unnecessary extra encodings from the CPU name enum in clang

2017-09-16 Thread Craig Topper via cfe-commits
Author: ctopper Date: Sat Sep 16 09:44:39 2017 New Revision: 313462 URL: http://llvm.org/viewvc/llvm-project?rev=313462&view=rev Log: [X86] Remove unnecessary extra encodings from the CPU name enum in clang Summary: For a lot of older CPUs we have a 1:1 mapping between CPU name and enum name. Bu

[PATCH] D21508: Diagnose friend function template redefinitions

2017-09-16 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff updated this revision to Diff 115539. sepavloff added a comment. Rebased https://reviews.llvm.org/D21508 Files: include/clang/AST/DeclBase.h lib/AST/Decl.cpp lib/Sema/SemaDecl.cpp lib/Sema/SemaTemplateInstantiateDecl.cpp test/SemaCXX/friend2.cpp Index: test/SemaCXX/friend2.

[Diffusion] rL302247: Introduce Wzero-as-null-pointer-constant.

2017-09-16 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added subscribers: thakis, cfe-commits, dblaikie, malcolm.parsons, hans, lebedev.ri. lebedev.ri raised a concern with this commit. lebedev.ri added a comment. Hi @thakis! Are you planning on addressing the kind-of false-positives this diagnostic produces? It should not warn if `0` is:

Re: r313315 - Diagnostic specific failed condition in a static_assert.

2017-09-16 Thread NAKAMURA Takumi via cfe-commits
This triggered failure in libcxx tests. http://bb.pgr.jp/builders/bootstrap-clang-libcxx-lld-i686-linux/builds/97 On Fri, Sep 15, 2017 at 8:40 AM Douglas Gregor via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Author: dgregor > Date: Thu Sep 14 16:38:42 2017 > New Revision: 313315 > > URL:

[PATCH] D30170: Function definition may have uninstantiated body

2017-09-16 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff updated this revision to Diff 115534. sepavloff added a comment. Rebased patch. https://reviews.llvm.org/D30170 Files: include/clang/AST/Decl.h lib/Sema/SemaDecl.cpp lib/Sema/SemaTemplateInstantiateDecl.cpp test/SemaCXX/friend2.cpp Index: test/SemaCXX/friend2.cpp

[PATCH] D37808: [clang-tidy] Add new hicpp-multiway-paths-covered check for missing branches

2017-09-16 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added a comment. Informationen my part think that both switch and else should stay here for now. Running it over llvm gave really a lot of warnings, and that a rather good codebase. The check did not recognize logic, your example would be warned against. I don't see a way to implemen

[PATCH] D37808: [clang-tidy] Add new hicpp-multiway-paths-covered check for missing branches

2017-09-16 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. In https://reviews.llvm.org/D37808#869810, @Eugene.Zelenko wrote: > In https://reviews.llvm.org/D37808#869612, @JonasToth wrote: > > > In https://reviews.llvm.org/D37808#869602, @Eugene.Zelenko wrote: > > > > > I think will be good idea to extend -Wswitch diagnostics.

[PATCH] D33514: [WIP] Bug 32352 - Provide a way for OptimizationRemarkEmitter::allowExtraAnalysis to check if (specific) remarks are enabled

2017-09-16 Thread NAKAMURA Takumi via Phabricator via cfe-commits
chapuni added a comment. Fixed in https://reviews.llvm.org/rL313456. Comment at: include/llvm/IR/DiagnosticHandler.h:12 +//===--===// + +#include "llvm/ADT/StringRef.h" Did you forget include g

[PATCH] D37808: [clang-tidy] Add new hicpp-multiway-paths-covered check for missing branches

2017-09-16 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added a comment. In https://reviews.llvm.org/D37808#869810, @Eugene.Zelenko wrote: > In https://reviews.llvm.org/D37808#869612, @JonasToth wrote: > > > In https://reviews.llvm.org/D37808#869602, @Eugene.Zelenko wrote: > > > > > I think will be good idea to extend -Wswitch diagnostics. >

[PATCH] D36836: [clang-tidy] Implement readability-function-cognitive-complexity check

2017-09-16 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added a comment. I see, forgot that. The doc were the interesting part for me, I trust that you test the code correctlty :) Repository: rL LLVM https://reviews.llvm.org/D36836 ___ cfe-commits mailing list cfe-commits@lists.llvm.org ht

[PATCH] D36836: [clang-tidy] Implement readability-function-cognitive-complexity check

2017-09-16 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. In https://reviews.llvm.org/D36836#873032, @JonasToth wrote: > I built the patch locally, here is my output: > > The Unittest failed for me: `Neither CHECK-FIXES nor CHECK-MESSAGES found in > the input` > > Script call: > `/usr/bin/python2.7 > /home/jonas/opt/llvm/

[PATCH] D36836: [clang-tidy] Implement readability-function-cognitive-complexity check

2017-09-16 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added a comment. I built the patch locally, here is my output: The Unittest failed for me: `Neither CHECK-FIXES nor CHECK-MESSAGES found in the input` Script call: `/usr/bin/python2.7 /home/jonas/opt/llvm/tools/clang/tools/extra/test/../test/clang-tidy/check_clang_tidy.py /home/jo

[PATCH] D37938: [X86] Remove unnecessary extra encodings from the CPU name enum in clang

2017-09-16 Thread Simon Pilgrim via Phabricator via cfe-commits
RKSimon accepted this revision. RKSimon added a comment. This revision is now accepted and ready to land. LGTM https://reviews.llvm.org/D37938 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe

[PATCH] D37941: [X86] Move even more of our CPU to feature mapping switch to use fallthroughs

2017-09-16 Thread Simon Pilgrim via Phabricator via cfe-commits
RKSimon accepted this revision. RKSimon added a comment. This revision is now accepted and ready to land. LGTM, there are a couple of other fall-throughs that could still be done. Comment at: lib/Basic/Targets/X86.cpp:141 setFeatureEnabledImpl(Features, "sse2", true);