[PATCH] D39451: P0620 follow-up: deducing `auto` from braced-init-list in new expr

2017-12-07 Thread Zhihao Yuan via Phabricator via cfe-commits
lichray updated this revision to Diff 126092. lichray added a comment. Keep a pedantic Extension warning. Repository: rC Clang https://reviews.llvm.org/D39451 Files: include/clang/Basic/DiagnosticSemaKinds.td lib/Sema/SemaExprCXX.cpp test/CXX/expr/expr.unary/expr.new/p2-cxx0x.cpp

[PATCH] D39050: Add index-while-building support to Clang

2017-12-07 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle added a comment. In https://reviews.llvm.org/D39050#948500, @akyrtzi wrote: > @malaperle, to clarify we are not suggesting that you write your own parser, > the suggestion is to use clang in 'fast-scan' mode to get the structure of > the declarations of a single file, see

Re: r320124 - Fold together the in-range and out-of-range portions of -Wtautological-compare.

2017-12-07 Thread Hans Wennborg via cfe-commits
I've reverted in r320133 since it caused new warnings in Chromium that I'm not sure were intentional. See comment on the revert. On Thu, Dec 7, 2017 at 5:00 PM, Richard Smith via cfe-commits wrote: > Author: rsmith > Date: Thu Dec 7 17:00:27 2017 > New Revision:

r320133 - Revert r320124 "Fold together the in-range and out-of-range portions of -Wtautological-compare."

2017-12-07 Thread Hans Wennborg via cfe-commits
Author: hans Date: Thu Dec 7 21:19:12 2017 New Revision: 320133 URL: http://llvm.org/viewvc/llvm-project?rev=320133=rev Log: Revert r320124 "Fold together the in-range and out-of-range portions of -Wtautological-compare." This broke Chromium: ../../base/trace_event/trace_log.cc:1545:29:

[PATCH] D40548: [clangd] Symbol index interfaces and index-based code completion.

2017-12-07 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle added a comment. As a follow-up, here's the interface for querying the index that I am using right now. It's meant to be able to retrieve from any kind of "backend", i.e. in-memory, ClangdIndexDataStore, libIndexStore, etc. I was able to implement "Open Workspace Symbol" (which is

[PATCH] D40897: [clangd] Introduce a "Symbol" class.

2017-12-07 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle added inline comments. Comment at: clangd/Symbol.h:23 + // The path of the source file where a symbol occurs. + std::string FilePath; + // The offset to the first character of the symbol from the beginning of the malaperle wrote: > sammccall wrote:

[PATCH] D40998: [driver][darwin] Take the OS version specified in "-target" as the target OS instead of inferring it from SDK / environment

2017-12-07 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith requested changes to this revision. dexonsmith added inline comments. This revision now requires changes to proceed. Comment at: lib/Driver/ToolChains/Darwin.cpp:1234-1276 +// The -target option specifies the deployment target when +// -m-version-min is not

[PATCH] D40998: [driver][darwin] Take the OS version specified in "-target" as the target OS instead of inferring it from SDK / environment

2017-12-07 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman created this revision. Herald added a subscriber: javed.absar. The OS version is specified in `-target` should be used instead of the one in an environment variable / SDK name. rdar://35813850 Repository: rC Clang https://reviews.llvm.org/D40998 Files:

[PATCH] D40997: [driver] Take target

2017-12-07 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman abandoned this revision. arphaman added a comment. Sorry, accidental Return. Will close and reopen. Repository: rC Clang https://reviews.llvm.org/D40997 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D40997: [driver] Take target

2017-12-07 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman created this revision. Herald added a subscriber: javed.absar. Repository: rC Clang https://reviews.llvm.org/D40997 Files: lib/Driver/ToolChains/Darwin.cpp test/Driver/appletvos-version-min.c test/Driver/darwin-multiarch-arm.c test/Driver/darwin-stdlib.cpp

[PATCH] D40996: Add --no-cuda-version-check in unknown-std.cpp

2017-12-07 Thread Kelvin Li via Phabricator via cfe-commits
kkwli0 created this revision. This unit test fails on the system that has CUDA Toolkit 9.0 installed. And CUDA 9 does not support GPU arch sm_20. It results in the following error. clang-6.0: error: GPU arch sm_20 is supported by CUDA versions between 7.0 and 8.0 (inclusive), but

r320132 - [Blocks] Inherit sanitizer options from parent decl

2017-12-07 Thread Vedant Kumar via cfe-commits
Author: vedantk Date: Thu Dec 7 18:47:58 2017 New Revision: 320132 URL: http://llvm.org/viewvc/llvm-project?rev=320132=rev Log: [Blocks] Inherit sanitizer options from parent decl There is no way to apply sanitizer suppressions to ObjC blocks. A reasonable default is to have blocks inherit

[PATCH] D40668: [Blocks] Inherit sanitizer options from parent decl

2017-12-07 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC320132: [Blocks] Inherit sanitizer options from parent decl (authored by vedantk). Repository: rC Clang https://reviews.llvm.org/D40668 Files: lib/CodeGen/CGBlocks.cpp

[PATCH] D39694: [VerifyDiagnosticConsumer] support -verify=

2017-12-07 Thread Joel E. Denny via Phabricator via cfe-commits
jdenny updated this revision to Diff 126086. jdenny added a comment. This update does the following: 1. Fixes the line wrapping that Richard pointed out. 2. Converts from std::vector to std::set for more efficient prefix lookup. 3. Grows a dependence on https://reviews.llvm.org/D40995 (which

[PATCH] D40668: [Blocks] Inherit sanitizer options from parent decl

2017-12-07 Thread Vedant Kumar via Phabricator via cfe-commits
vsk added a comment. In https://reviews.llvm.org/D40668#949096, @zaks.anna wrote: > LGTM. > > Thanks! > > I was wondering if there are other places where this propagation needs to be > added, for example, other calls to GenerateBlockFunction. Thanks for the review :). Yes there is one other

r320131 - Add a test that the __STDC_VERSION__ macro reports the correct value for -std=c17.

2017-12-07 Thread Aaron Ballman via cfe-commits
Author: aaronballman Date: Thu Dec 7 18:39:26 2017 New Revision: 320131 URL: http://llvm.org/viewvc/llvm-project?rev=320131=rev Log: Add a test that the __STDC_VERSION__ macro reports the correct value for -std=c17. Added: cfe/trunk/test/Preprocessor/c17.c Added:

[PATCH] D40995: [TextDiagnosticBuffer] Fix diagnostic note emission order.

2017-12-07 Thread Joel E. Denny via Phabricator via cfe-commits
jdenny created this revision. The frontend currently groups diagnostics from the command line according to diagnostic level, but that places all notes last. Fix that by emitting such diagnostics in the order they were generated. https://reviews.llvm.org/D40995 Files:

[PATCH] D39694: [VerifyDiagnosticConsumer] support -verify=

2017-12-07 Thread Joel E. Denny via Phabricator via cfe-commits
jdenny added a comment. In https://reviews.llvm.org/D39694#949066, @rsmith wrote: > I've not done a detailed review of the string manipulation here, but this > looks like a great feature, thanks! Hi Richard. Thanks for your feedback. I'll fix the line wrapping you pointed out.

[PATCH] D39694: [VerifyDiagnosticConsumer] support -verify=

2017-12-07 Thread Joel E. Denny via Phabricator via cfe-commits
jdenny marked 13 inline comments as done. jdenny added a comment. I marked the comments related to Hal's suggestions as done to avoid confusion for future reviews. I'm not used to using this sort of tool for reviews. Hopefully it's appropriate for the author to do that rather than the

[PATCH] D40668: [Blocks] Inherit sanitizer options from parent decl

2017-12-07 Thread Anna Zaks via Phabricator via cfe-commits
zaks.anna accepted this revision. zaks.anna added a comment. This revision is now accepted and ready to land. LGTM. Thanks! I was wondering if there are other places where this propagation needs to be added, for example, other calls to GenerateBlockFunction. https://reviews.llvm.org/D40668

r320128 - [ubsan] Use pass_object_size info in bounds checks

2017-12-07 Thread Vedant Kumar via cfe-commits
Author: vedantk Date: Thu Dec 7 17:51:47 2017 New Revision: 320128 URL: http://llvm.org/viewvc/llvm-project?rev=320128=rev Log: [ubsan] Use pass_object_size info in bounds checks Teach UBSan's bounds check to opportunistically use pass_object_size information to check array accesses.

Re: r315996 - [CMake][OpenMP] Customize default offloading arch

2017-12-07 Thread Jonas Hahnfeld via cfe-commits
Am 2017-12-07 20:34, schrieb Jonas Hahnfeld via cfe-commits: Hi Ahmed, Am 2017-12-07 19:57, schrieb Ahmed Bougacha: Hi Jonas, On Tue, Oct 17, 2017 at 6:37 AM, Jonas Hahnfeld via cfe-commits wrote: Author: hahnfeld Date: Tue Oct 17 06:37:36 2017 New Revision:

Re: r315996 - [CMake][OpenMP] Customize default offloading arch

2017-12-07 Thread Jonas Hahnfeld via cfe-commits
Hi Ahmed, Am 2017-12-07 19:57, schrieb Ahmed Bougacha: Hi Jonas, On Tue, Oct 17, 2017 at 6:37 AM, Jonas Hahnfeld via cfe-commits wrote: Author: hahnfeld Date: Tue Oct 17 06:37:36 2017 New Revision: 315996 URL: http://llvm.org/viewvc/llvm-project?rev=315996=rev

r320124 - Fold together the in-range and out-of-range portions of -Wtautological-compare.

2017-12-07 Thread Richard Smith via cfe-commits
Author: rsmith Date: Thu Dec 7 17:00:27 2017 New Revision: 320124 URL: http://llvm.org/viewvc/llvm-project?rev=320124=rev Log: Fold together the in-range and out-of-range portions of -Wtautological-compare. Modified: cfe/trunk/lib/Sema/SemaChecking.cpp Modified:

Re: r315996 - [CMake][OpenMP] Customize default offloading arch

2017-12-07 Thread Ahmed Bougacha via cfe-commits
Hi Jonas, On Tue, Oct 17, 2017 at 6:37 AM, Jonas Hahnfeld via cfe-commits wrote: > Author: hahnfeld > Date: Tue Oct 17 06:37:36 2017 > New Revision: 315996 > > URL: http://llvm.org/viewvc/llvm-project?rev=315996=rev > Log: > [CMake][OpenMP] Customize default

[PATCH] D39694: [VerifyDiagnosticConsumer] support -verify=

2017-12-07 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. I've not done a detailed review of the string manipulation here, but this looks like a great feature, thanks! Comment at: include/clang/Basic/DiagnosticDriverKinds.td:342 + +def note_drv_verify_prefix_spelling : Note<"-verify prefixes must start with a

r320122 - Unify implementation of our two different flavours of -Wtautological-compare.

2017-12-07 Thread Richard Smith via cfe-commits
Author: rsmith Date: Thu Dec 7 16:45:25 2017 New Revision: 320122 URL: http://llvm.org/viewvc/llvm-project?rev=320122=rev Log: Unify implementation of our two different flavours of -Wtautological-compare. In so doing, fix a handful of remaining bugs where we would report false positives or

[PATCH] D40941: [ubsan] Use pass_object_size info in bounds checks (compiler-rt)

2017-12-07 Thread Vedant Kumar via Phabricator via cfe-commits
vsk added inline comments. Comment at: test/ubsan/TestCases/Misc/bounds.cpp:9 +int get_int(int *const p __attribute__((pass_object_size(0))), int i) { + // CHECK-A-2: bounds.cpp:[[@LINE+1]]:10: runtime error: index 2 out of bounds for type 'int *' + return p[i];

[PATCH] D40941: [ubsan] Use pass_object_size info in bounds checks (compiler-rt)

2017-12-07 Thread George Burgess IV via Phabricator via cfe-commits
george.burgess.iv added a comment. If the answer to my question is "no, it'll just work," LGTM. Thanks! Comment at: test/ubsan/TestCases/Misc/bounds.cpp:9 +int get_int(int *const p __attribute__((pass_object_size(0))), int i) { + // CHECK-A-2: bounds.cpp:[[@LINE+1]]:10:

[PATCH] D40940: [ubsan] Use pass_object_size info in bounds checks

2017-12-07 Thread George Burgess IV via Phabricator via cfe-commits
george.burgess.iv accepted this revision. george.burgess.iv added a comment. This revision is now accepted and ready to land. LGTM. Thanks again! https://reviews.llvm.org/D40940 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D40991: [libcxx] [test] Fix line endings, avoid unnecessary non-ASCII.

2017-12-07 Thread Stephan T. Lavavej via Phabricator via cfe-commits
STL_MSFT created this revision. [libcxx] [test] Fix line endings, avoid unnecessary non-ASCII. I recently wrote a tool to audit MSVC's codebase for inconsistent line endings and unnecessary non-ASCII characters, and I ran it over libcxx's codebase too. I don't need any of these changes to be

[PATCH] D39050: Add index-while-building support to Clang

2017-12-07 Thread Nathan Hawes via Phabricator via cfe-commits
nathawes updated this revision to Diff 126065. nathawes added a comment. Herald added a subscriber: mgrang. Worked through the comments from @ioeric and split the code for writing out the collected indexing data into a separate patch. https://reviews.llvm.org/D39050 Files:

[PATCH] D40668: [Blocks] Inherit sanitizer options from parent decl

2017-12-07 Thread Vedant Kumar via Phabricator via cfe-commits
vsk added a comment. Friendly ping. https://reviews.llvm.org/D40668 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D40940: [ubsan] Use pass_object_size info in bounds checks

2017-12-07 Thread Vedant Kumar via Phabricator via cfe-commits
vsk updated this revision to Diff 126064. vsk added a comment. - Handle constant size modifiers while we're at it (e.g "int foo(int p[static 10])"). https://reviews.llvm.org/D40940 Files: lib/CodeGen/CGExpr.cpp lib/CodeGen/CodeGenFunction.h test/CodeGen/ubsan-pass-object-size.c Index:

[PATCH] D39050: Add index-while-building support to Clang

2017-12-07 Thread Nathan Hawes via Phabricator via cfe-commits
nathawes added inline comments. Comment at: lib/FrontendTool/ExecuteCompilerInvocation.cpp:170 +Act = index::createIndexDataRecordingAction(FEOpts, std::move(Act)); +CI.setGenModuleActionWrapper(::createIndexDataRecordingAction); + } ioeric wrote: >

[PATCH] D40988: Clang-format: add finer-grained options for putting all arguments on one line

2017-12-07 Thread Russell McClellan via Phabricator via cfe-commits
russellmcc created this revision. Herald added a subscriber: klimek. Add two new options, AllowAllArgumentsOnNextLine and AllowAllConstructorInitializersOnNextLine. These mirror the existing AllowAllParametersOfDeclarationOnNextLine and allow me to support an internal style guide where I work.

[PATCH] D40936: Hardware-assisted AddressSanitizer (clang part).

2017-12-07 Thread Evgenii Stepanov via Phabricator via cfe-commits
eugenis updated this revision to Diff 126060. eugenis added a comment. clang-format https://reviews.llvm.org/D40936 Files: clang/include/clang/Basic/Sanitizers.def clang/include/clang/Driver/SanitizerArgs.h clang/lib/CodeGen/BackendUtil.cpp clang/lib/CodeGen/CGDeclCXX.cpp

[PATCH] D39451: P0620 follow-up: deducing `auto` from braced-init-list in new expr

2017-12-07 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. EDG and MSVC do not appear to treat this as a defect resolution; I suspect this is an oversight in GCC rather than an intentional extension. Let's convert the error to an (off by default) pedantic `Extension` (ISO C++11 does not allow ...), and suppress the extension

r320115 - Correct line endings that got mixed up in r320088; NFC.

2017-12-07 Thread Aaron Ballman via cfe-commits
Author: aaronballman Date: Thu Dec 7 15:10:09 2017 New Revision: 320115 URL: http://llvm.org/viewvc/llvm-project?rev=320115=rev Log: Correct line endings that got mixed up in r320088; NFC. Modified: cfe/trunk/test/Preprocessor/has_c_attribute.c Modified:

Re: r320089 - Add new language mode flags for C17.

2017-12-07 Thread Ahmed Bougacha via cfe-commits
On Thu, Dec 7, 2017 at 3:05 PM, Aaron Ballman wrote: > On Thu, Dec 7, 2017 at 6:00 PM, Aaron Ballman wrote: >> On Thu, Dec 7, 2017 at 5:59 PM, Ahmed Bougacha >> wrote: >>> On Thu, Dec 7, 2017 at 2:56 PM, Richard Smith

[PATCH] D35181: Defer addition of keywords to identifier table when loading AST

2017-12-07 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. LGTM, but I'd like the old `IdentifierTable` constructor to be removed if there are no callers left. Comment at: include/clang/Basic/IdentifierTable.h:473-476 /// \brief Create the identifier table, populating it with info about the /// language

Re: r320089 - Add new language mode flags for C17.

2017-12-07 Thread Ahmed Bougacha via cfe-commits
On Thu, Dec 7, 2017 at 3:00 PM, Aaron Ballman wrote: > On Thu, Dec 7, 2017 at 5:59 PM, Ahmed Bougacha > wrote: >> On Thu, Dec 7, 2017 at 2:56 PM, Richard Smith via cfe-commits >> wrote: >>> Looks like this might have

Re: r320089 - Add new language mode flags for C17.

2017-12-07 Thread Aaron Ballman via cfe-commits
On Thu, Dec 7, 2017 at 6:00 PM, Aaron Ballman wrote: > On Thu, Dec 7, 2017 at 5:59 PM, Ahmed Bougacha > wrote: >> On Thu, Dec 7, 2017 at 2:56 PM, Richard Smith via cfe-commits >> wrote: >>> Looks like this might have

r320113 - Correct line endings that got mixed up in r320089; NFC.

2017-12-07 Thread Aaron Ballman via cfe-commits
Author: aaronballman Date: Thu Dec 7 15:04:11 2017 New Revision: 320113 URL: http://llvm.org/viewvc/llvm-project?rev=320113=rev Log: Correct line endings that got mixed up in r320089; NFC. Modified: cfe/trunk/include/clang/Frontend/LangStandard.h

[PATCH] D40671: [clang-tidy] Support specific checks for NOLINT directive

2017-12-07 Thread Anton via Phabricator via cfe-commits
xgsa updated this revision to Diff 126058. xgsa added a comment. Documentation update https://reviews.llvm.org/D40671 Files: clang-tidy/ClangTidyDiagnosticConsumer.cpp docs/ReleaseNotes.rst docs/clang-tidy/index.rst test/clang-tidy/nolint.cpp test/clang-tidy/nolintnextline.cpp

[PATCH] D40218: [Clang] Add __builtin_launder

2017-12-07 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: lib/CodeGen/CGBuiltin.cpp:1674 +Value *Ptr = EmitScalarExpr(E->getArg(0)); +Ptr = Builder.CreateInvariantGroupBarrier(Ptr); +return RValue::get(Ptr); It would be nice to avoid this for types that contain no

[PATCH] D40671: [clang-tidy] Support specific checks for NOLINT directive

2017-12-07 Thread Anton via Phabricator via cfe-commits
xgsa marked an inline comment as done. xgsa added a comment. In https://reviews.llvm.org/D40671#948826, @aaron.ballman wrote: > There are still some outstanding concerns around the documentation wording, > but once those are resolved it should be ready to commit. If you don't have > commit

Re: r320089 - Add new language mode flags for C17.

2017-12-07 Thread Aaron Ballman via cfe-commits
On Thu, Dec 7, 2017 at 5:59 PM, Ahmed Bougacha wrote: > On Thu, Dec 7, 2017 at 2:56 PM, Richard Smith via cfe-commits > wrote: >> Looks like this might have messed up the line endings in a few files? > > Should be taken care of in r320112.

[PATCH] D39451: P0620 follow-up: deducing `auto` from braced-init-list in new expr

2017-12-07 Thread Zhihao Yuan via Phabricator via cfe-commits
lichray added a comment. Ping. Just accept this as a DR, like what GCC does, I guess? https://reviews.llvm.org/D39451 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: r320089 - Add new language mode flags for C17.

2017-12-07 Thread Ahmed Bougacha via cfe-commits
On Thu, Dec 7, 2017 at 2:56 PM, Richard Smith via cfe-commits wrote: > Looks like this might have messed up the line endings in a few files? Should be taken care of in r320112. -Ahmed > On 7 December 2017 at 13:46, Aaron Ballman via cfe-commits >

r320112 - Remove line-endings added by r320089. NFC.

2017-12-07 Thread Ahmed Bougacha via cfe-commits
Author: ab Date: Thu Dec 7 14:58:02 2017 New Revision: 320112 URL: http://llvm.org/viewvc/llvm-project?rev=320112=rev Log: Remove line-endings added by r320089. NFC. Modified: cfe/trunk/include/clang/Basic/LangOptions.def Modified: cfe/trunk/include/clang/Basic/LangOptions.def URL:

[PATCH] D40948: Switch Clang's default C++ language target to C++14

2017-12-07 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. In https://reviews.llvm.org/D40948#948843, @t.p.northover wrote: > Thanks Richard. I'll file the bugs tomorrow for the issues you suggest. Do > you see either of them blocking the change to C++14 as a default? On a scale > of "no", "no but I want a commitment to fix

[PATCH] D40948: Switch Clang's default C++ language target to C++14

2017-12-07 Thread Tim Northover via Phabricator via cfe-commits
t.p.northover added a comment. Thanks Richard. I'll file the bugs tomorrow for the issues you suggest. Do you see either of them blocking the change to C++14 as a default? On a scale of "no", "no but I want a commitment to fix them" and "yes" sort of thing. Tonight I've just got one comment

[PATCH] D40937: [clang-tidy] Infinite loop checker

2017-12-07 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a reviewer: dcoughlin. aaron.ballman added a subscriber: dcoughlin. aaron.ballman added a comment. I share the concerns that @Eugene.Zelenko brought up regarding this not being in the analyzer. This is a path sensitive problem that I'm not certain clang-tidy is the best home

[libunwind] r320103 - Creating release candidate rc3 from release_501 branch

2017-12-07 Thread Tom Stellard via cfe-commits
Author: tstellar Date: Thu Dec 7 14:11:09 2017 New Revision: 320103 URL: http://llvm.org/viewvc/llvm-project?rev=320103=rev Log: Creating release candidate rc3 from release_501 branch Added: libunwind/tags/RELEASE_501/rc3/ (props changed) - copied from r320102,

[libcxxabi] r320097 - Creating release candidate rc3 from release_501 branch

2017-12-07 Thread Tom Stellard via cfe-commits
Author: tstellar Date: Thu Dec 7 14:10:43 2017 New Revision: 320097 URL: http://llvm.org/viewvc/llvm-project?rev=320097=rev Log: Creating release candidate rc3 from release_501 branch Added: libcxxabi/tags/RELEASE_501/rc3/ - copied from r320096, libcxxabi/branches/release_50/

[libcxx] r320096 - Creating release candidate rc3 from release_501 branch

2017-12-07 Thread Tom Stellard via cfe-commits
Author: tstellar Date: Thu Dec 7 14:10:39 2017 New Revision: 320096 URL: http://llvm.org/viewvc/llvm-project?rev=320096=rev Log: Creating release candidate rc3 from release_501 branch Added: libcxx/tags/RELEASE_501/rc3/ (props changed) - copied from r320095,

[PATCH] D40671: [clang-tidy] Support specific checks for NOLINT directive

2017-12-07 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman requested changes to this revision. aaron.ballman added a comment. This revision now requires changes to proceed. In https://reviews.llvm.org/D40671#947762, @xgsa wrote: > So can this patch be submitted? Should I do something to make it happen? There are still some outstanding

[PATCH] D35181: Defer addition of keywords to identifier table when loading AST

2017-12-07 Thread Johann Klähn via Phabricator via cfe-commits
jklaehn added a comment. Ping, can you take another look? https://reviews.llvm.org/D35181 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D40940: [ubsan] Use pass_object_size info in bounds checks

2017-12-07 Thread Vedant Kumar via Phabricator via cfe-commits
vsk updated this revision to Diff 126037. vsk added a comment. Thanks for your feedback. - Give up on 0-sized types. - Give up on pass_object_size(2 | 3). https://reviews.llvm.org/D40940 Files: lib/CodeGen/CGExpr.cpp lib/CodeGen/CodeGenFunction.h test/CodeGen/ubsan-pass-object-size.c

r320091 - [Analysis] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC).

2017-12-07 Thread Eugene Zelenko via cfe-commits
Author: eugenezelenko Date: Thu Dec 7 13:55:09 2017 New Revision: 320091 URL: http://llvm.org/viewvc/llvm-project?rev=320091=rev Log: [Analysis] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC). Modified: cfe/trunk/include/clang/Analysis/CFG.h

r320082 - [OpenMP] NVPTX: Set default/minimum compute capability to sm_35

2017-12-07 Thread George Rokos via cfe-commits
Author: grokos Date: Thu Dec 7 12:27:31 2017 New Revision: 320082 URL: http://llvm.org/viewvc/llvm-project?rev=320082=rev Log: [OpenMP] NVPTX: Set default/minimum compute capability to sm_35 The current implementation of the nvptx runtime (to be upstreamed shortly) uses the atomicMax operation

[PATCH] D40225: Add -std=c17 as a flag

2017-12-07 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman closed this revision. aaron.ballman added a comment. Commit in r320089. https://reviews.llvm.org/D40225 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

r320089 - Add new language mode flags for C17.

2017-12-07 Thread Aaron Ballman via cfe-commits
Author: aaronballman Date: Thu Dec 7 13:46:26 2017 New Revision: 320089 URL: http://llvm.org/viewvc/llvm-project?rev=320089=rev Log: Add new language mode flags for C17. This adds -std=c17, -std=gnu17, and -std=iso9899:2017 as language mode flags for C17 and updates the value of

[PATCH] D40983: Generate Libclang invocation reproducers using a new -cc1gen-reproducer option

2017-12-07 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman created this revision. Herald added a subscriber: mgorny. This patch is a follow up to the previous work that recorded Libclang invocations into temporary files: https://reviews.llvm.org/D40527. It adds a new -cc1 mode to clang: `-cc1gen-reproducer`. The goal of this mode is to

[PATCH] D39665: Support __has_c_attribute

2017-12-07 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman closed this revision. aaron.ballman added a comment. Commit in r320088. https://reviews.llvm.org/D39665 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D40948: Switch Clang's default C++ language target to C++14

2017-12-07 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: clang/test/CodeGenCXX/new-overflow.cpp:88 // CHECK: [[N:%.*]] = sext i16 {{%.*}} to i32 - // CHECK-NEXT: [[T0:%.*]] = icmp slt i32 [[N]], 0 - // CHECK-NEXT: [[T1:%.*]] = select i1 [[T0]], i32 -1, i32 [[N]] - // CHECK-NEXT:

[PATCH] D40968: [OpenMP] Diagnose function name on the link clause

2017-12-07 Thread Kelvin Li via Phabricator via cfe-commits
kkwli0 updated this revision to Diff 126025. kkwli0 marked an inline comment as done. https://reviews.llvm.org/D40968 Files: include/clang/Basic/DiagnosticSemaKinds.td include/clang/Sema/Sema.h lib/Sema/SemaOpenMP.cpp test/OpenMP/declare_target_ast_print.cpp

[PATCH] D40968: [OpenMP] Diagnose function name on the link clause

2017-12-07 Thread Kelvin Li via Phabricator via cfe-commits
kkwli0 marked an inline comment as done. kkwli0 added inline comments. Comment at: lib/Sema/SemaOpenMP.cpp:12576 +if (MT == OMPDeclareTargetDeclAttr::MT_Link && isa(ND)) { + Diag(Id.getLoc(), diag::err_omp_function_in_link_clause); ABataev wrote: > I

[PATCH] D40948: Switch Clang's default C++ language target to C++14

2017-12-07 Thread Tim Northover via Phabricator via cfe-commits
t.p.northover added inline comments. Comment at: clang/test/SemaCXX/new-array-size-conv.cpp:1 -// RUN: %clang_cc1 -fsyntax-only -pedantic -verify %s +// RUN: %clang_cc1 -fsyntax-only -pedantic -verify -std=gnu++98 %s // RUN: %clang_cc1 -fsyntax-only -pedantic -verify -std=c++98

[PATCH] D40625: Harmonizing attribute GNU/C++ spellings

2017-12-07 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith accepted this revision. rsmith added a comment. This revision is now accepted and ready to land. LGTM. I think the `LateParsed` attributes are not going to work properly (because they'd be written in places where the function parameters are not in scope), so I wonder if we should avoid

[PATCH] D40225: Add -std=c17 as a flag

2017-12-07 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith accepted this revision. rsmith added a comment. This revision is now accepted and ready to land. LGTM, makes sense to add this for GCC compatibility even if the standard ends up being called C18. https://reviews.llvm.org/D40225 ___

[PATCH] D39665: Support __has_c_attribute

2017-12-07 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith accepted this revision. rsmith added a comment. This revision is now accepted and ready to land. Please update the documentation and the release notes. https://reviews.llvm.org/D39665 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

r320085 - [libclang] Record code-completion invocations to a temporary file when

2017-12-07 Thread Alex Lorenz via cfe-commits
Author: arphaman Date: Thu Dec 7 12:37:50 2017 New Revision: 320085 URL: http://llvm.org/viewvc/llvm-project?rev=320085=rev Log: [libclang] Record code-completion invocations to a temporary file when requested by client This is a follow up to r319702 which records parsing invocations. These

[PATCH] D40977: [OpenMP] NVPTX: Set default/minimum compute capability to sm_35

2017-12-07 Thread George Rokos via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC320082: [OpenMP] NVPTX: Set default/minimum compute capability to sm_35 (authored by grokos). Repository: rC Clang https://reviews.llvm.org/D40977 Files: CMakeLists.txt Index: CMakeLists.txt

[PATCH] D30691: [analyzer] Support for naive cross translational unit analysis

2017-12-07 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun updated this revision to Diff 125986. xazax.hun added a comment. Herald added a subscriber: rnkovacs. - @gerazo addressed some review comments in scan-build-py. https://reviews.llvm.org/D30691 Files: include/clang/AST/ASTContext.h

[PATCH] D39363: [clang-tidy] Correctly classify constant arrays and constant strings as constants when checking identifiers naming

2017-12-07 Thread Beren Minor via Phabricator via cfe-commits
berenm added a comment. In https://reviews.llvm.org/D39363#948134, @alexfh wrote: > Sorry for the delay. I missed this revision somehow. Please add cfe-commits > to the subscribers list so that others can chime in. No worries, I'll add it in the future. Thanks! Repository: rCTE Clang

[PATCH] D40977: [OpenMP] NVPTX: Set default/minimum compute capability to sm_35

2017-12-07 Thread Guansong Zhang via Phabricator via cfe-commits
guansong added a comment. LGTM. Repository: rC Clang https://reviews.llvm.org/D40977 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D39363: [clang-tidy] Correctly classify constant arrays and constant strings as constants when checking identifiers naming

2017-12-07 Thread Beren Minor via Phabricator via cfe-commits
berenm updated this revision to Diff 126017. berenm added a comment. Herald added a subscriber: klimek. Factor !Type.isNull() && Type.isConstQualified() condition Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D39363 Files: clang-tidy/readability/IdentifierNamingCheck.cpp

[PATCH] D40448: Add a printing policy for AST dumping

2017-12-07 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman updated this revision to Diff 126016. aaron.ballman added a comment. Ping. Added more context to the patch. https://reviews.llvm.org/D40448 Files: include/clang/AST/Type.h lib/AST/ASTDumper.cpp lib/AST/TypePrinter.cpp lib/StaticAnalyzer/Checkers/PaddingChecker.cpp

[PATCH] D40225: Add -std=c17 as a flag

2017-12-07 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In https://reviews.llvm.org/D40225#944113, @aaron.ballman wrote: > Rebased on ToT and given more context. Ping. I'd like to get this in before the 6.0 branch. https://reviews.llvm.org/D40225 ___ cfe-commits mailing

[PATCH] D40625: Harmonizing attribute GNU/C++ spellings

2017-12-07 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman updated this revision to Diff 126015. aaron.ballman marked an inline comment as done. aaron.ballman added a comment. Updated based on review feedback. This patch leaves off attributes with custom parsing, as well as `analyzer_noreturn`, so that we can handle them as special cases.

[PATCH] D40625: Harmonizing attribute GNU/C++ spellings

2017-12-07 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman marked 4 inline comments as done. aaron.ballman added inline comments. Comment at: include/clang/Basic/Attr.td:1218-1228 def NeonPolyVectorType : TypeAttr { - let Spellings = [GNU<"neon_polyvector_type">]; + let Spellings = [Clang<"neon_polyvector_type">];

[PATCH] D40940: [ubsan] Use pass_object_size info in bounds checks

2017-12-07 Thread George Burgess IV via Phabricator via cfe-commits
george.burgess.iv added a comment. Thanks for this! It's interesting to me that these array-bound checks don't seem to use `@llvm.objectsize` in some form already. I can't find any notes about it grepping through git/source, so I'm happy with it. Comment at:

r320078 - [OPENMP] Do not capture private variables in the target regions.

2017-12-07 Thread Alexey Bataev via cfe-commits
Author: abataev Date: Thu Dec 7 11:49:28 2017 New Revision: 320078 URL: http://llvm.org/viewvc/llvm-project?rev=320078=rev Log: [OPENMP] Do not capture private variables in the target regions. Private variables are completely redefined in the outlined regions, so we don't need to capture them.

[PATCH] D40948: Switch Clang's default C++ language target to C++14

2017-12-07 Thread Paul Robinson via Phabricator via cfe-commits
probinson added a reviewer: rjmccall. probinson added a comment. +rjmccall for the codegen bits. Comment at: clang/test/SemaCXX/new-array-size-conv.cpp:1 -// RUN: %clang_cc1 -fsyntax-only -pedantic -verify %s +// RUN: %clang_cc1 -fsyntax-only -pedantic -verify -std=gnu++98 %s

[PATCH] D40977: [OpenMP] NVPTX: Set default/minimum compute capability to sm_35

2017-12-07 Thread George Rokos via Phabricator via cfe-commits
grokos created this revision. grokos added a project: OpenMP. Herald added a subscriber: mgorny. The current implementation of the nvptx runtime (to be upstreamed shortly) uses the `atomicMax` operation on 64-bit integers. This is only supported in compute capabilities 3.5 and later. I've

[PATCH] D40936: Hardware-assisted AddressSanitizer (clang part).

2017-12-07 Thread Evgenii Stepanov via Phabricator via cfe-commits
eugenis added inline comments. Comment at: clang/include/clang/Basic/Sanitizers.def:47 +SANITIZER("hwaddress", HWAddress) + alekseyshl wrote: > Why didn't we follow KASan style and name it "hw-address"? A matter of taste, I guess. I don't want the attribute to

[PATCH] D39375: [clang] Add PPCallbacks list to preprocessor when building a preacompiled preamble.

2017-12-07 Thread William Enright via Phabricator via cfe-commits
Nebiroth added inline comments. Comment at: lib/Frontend/PrecompiledPreamble.cpp:242 std::shared_ptr PCHContainerOps, bool StoreInMemory, -PreambleCallbacks ) { +PreambleCallbacks , std::unique_ptr PPCallbacks) { assert(VFS && "VFS is null");

[PATCH] D40938: update hwasan docs

2017-12-07 Thread Kostya Serebryany via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC320075: update hwasan docs (authored by kcc). Changed prior to commit: https://reviews.llvm.org/D40938?vs=126001=126005#toc Repository: rC Clang https://reviews.llvm.org/D40938 Files:

r320075 - update hwasan docs

2017-12-07 Thread Kostya Serebryany via cfe-commits
Author: kcc Date: Thu Dec 7 11:21:30 2017 New Revision: 320075 URL: http://llvm.org/viewvc/llvm-project?rev=320075=rev Log: update hwasan docs Summary: * use more readable name * document the hwasan attribute Reviewers: eugenis Reviewed By: eugenis Subscribers: llvm-commits, cfe-commits

[PATCH] D40936: Hardware-assisted AddressSanitizer (clang part).

2017-12-07 Thread Aleksey Shlyapnikov via Phabricator via cfe-commits
alekseyshl accepted this revision. alekseyshl added inline comments. Comment at: clang/include/clang/Basic/Sanitizers.def:47 +SANITIZER("hwaddress", HWAddress) + Why didn't we follow KASan style and name it "hw-address"? Comment at:

[PATCH] D40682: [driver] Set the 'simulator' environment for Darwin when -msimulator-version-min is used

2017-12-07 Thread Alex Lorenz via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC320073: [driver] Set the 'simulator' environment for Darwin when compiling for (authored by arphaman). Repository: rC Clang https://reviews.llvm.org/D40682 Files: include/clang/Driver/ToolChain.h

[PATCH] D40938: update hwasan docs

2017-12-07 Thread Kostya Serebryany via Phabricator via cfe-commits
kcc updated this revision to Diff 126001. kcc added a comment. mention https://www.kernel.org/doc/Documentation/arm64/tagged-pointers.txt Repository: rC Clang https://reviews.llvm.org/D40938 Files: docs/HardwareAssistedAddressSanitizerDesign.rst Index:

[clang-tools-extra] r320074 - [clangd-fuzzer] Update contruction of LSPServer.

2017-12-07 Thread Matt Morehouse via cfe-commits
Author: morehouse Date: Thu Dec 7 11:04:27 2017 New Revision: 320074 URL: http://llvm.org/viewvc/llvm-project?rev=320074=rev Log: [clangd-fuzzer] Update contruction of LSPServer. The constructor for ClangdLSPServer changed in r318412 and r318925, breaking the clangd-fuzzer build. Modified:

r320073 - [driver] Set the 'simulator' environment for Darwin when compiling for

2017-12-07 Thread Alex Lorenz via cfe-commits
Author: arphaman Date: Thu Dec 7 11:04:10 2017 New Revision: 320073 URL: http://llvm.org/viewvc/llvm-project?rev=320073=rev Log: [driver] Set the 'simulator' environment for Darwin when compiling for iOS/tvOS/watchOS simulator rdar://35135215 Differential Revision:

[PATCH] D39050: Add index-while-building support to Clang

2017-12-07 Thread Argyrios Kyrtzidis via Phabricator via cfe-commits
akyrtzi added a comment. @malaperle, to clarify we are not suggesting that you write your own parser, the suggestion is to use clang in 'fast-scan' mode to get the structure of the declarations of a single file, see `CXTranslationUnit_SingleFileParse` (along with enabling skipping of bodies).

[PATCH] D40968: [OpenMP] Diagnose function name on the link clause

2017-12-07 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: lib/Sema/SemaOpenMP.cpp:12576 +if (MT == OMPDeclareTargetDeclAttr::MT_Link && isa(ND)) { + Diag(Id.getLoc(), diag::err_omp_function_in_link_clause); I would like to see this some in `check` functions, like

[PATCH] D39050: Add index-while-building support to Clang

2017-12-07 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle added inline comments. Comment at: include/indexstore/IndexStoreCXX.h:84 + + std::pair getLineCol() { +unsigned line, col; ioeric wrote: > nathawes wrote: > > malaperle wrote: > > > From what I understand, this returns the

[PATCH] D40968: [OpenMP] Diagnose function name on the link clause

2017-12-07 Thread Kelvin Li via Phabricator via cfe-commits
kkwli0 created this revision. This patch is to add diagnose when a function name is specified on the link clause. According to the OpenMP spec, only the list items that exclude the function name are allowed on the link clause. void foo() {} #pragma omp declare target link(foo)

  1   2   >