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

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&view=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: ht

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 > wrote: >> >> Author: aaronballman >> Date: Thu

[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 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. Thanks, I was just getting on that. Sorry about the inad

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

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

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

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&view=rev Log: Correct line endings that got mixed up in r320089; NFC. Modified: cfe/trunk/include/clang/Frontend/LangStandard.h cfe/trunk/include/clang/Frontend/Lan

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 messed up the line endings in a few files? >> >> Should be taken care of in r3

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 messed up the line endings in a few files? >> >> Should be taken care of in r3

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

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 via cfe-commits >>> wrote: Looks like this might have messed up the lin

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&view=rev Log: Correct line endings that got mixed up in r320088; NFC. Modified: cfe/trunk/test/Preprocessor/has_c_attribute.c Modified: cfe/trunk/test/Preprocessor/has

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

[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 clang/lib/Co

[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. I

[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(&index::createIndexDataRecordingAction); + } ioeric wrote:

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

[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] 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: include/clang/Basi

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

[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 http://lists.ll

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

[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]; --

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&view=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] 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

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&view=rev > Log: > [CMake][OpenMP] Customize default offloading arch > > For the shuff

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&view=rev Log: Fold together the in-range and out-of-range portions of -Wtautological-compare. Modified: cfe/trunk/lib/Sema/SemaChecking.cpp Modified: cfe/trunk/lib/Sema/Sema

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&view=rev Log: [CMake][OpenMP] Custo

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: 315996 URL: http://llvm.org/view

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&view=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. rdar:

[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

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

[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. https://rev

[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: include/clang/Frontend/T

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&view=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: cfe/trunk/test/Prepro

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

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

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&view=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 test/CodeGenObjC/no-sanitize

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

[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 test/Driver/darwin

[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 http://lists.llvm.org/cgi-bi

[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: lib/Driver/ToolChains/Darw

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

[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] 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 clo

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&view=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: e

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: 320124 > > URL: http://llvm.org/v

[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 `CXTranslati

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

<    1   2