[PATCH] D37254: [Sema] Disallow assigning record lvalues with nested const-qualified fields.

2017-09-06 Thread Bjorn Pettersson via Phabricator via cfe-commits
bjope added inline comments. Comment at: include/clang/Basic/DiagnosticSemaKinds.td:5888 def note_typecheck_assign_const : Note< "%select{" Shouldn't there be one more entry here as well? (see comment about updating both err_typecheck_assign_const and note

r312701 - [mips] Replace Triple::Environment check by the isGNUEnvironment() call. NFC

2017-09-06 Thread Simon Atanasyan via cfe-commits
Author: atanasyan Date: Wed Sep 6 23:05:06 2017 New Revision: 312701 URL: http://llvm.org/viewvc/llvm-project?rev=312701&view=rev Log: [mips] Replace Triple::Environment check by the isGNUEnvironment() call. NFC Modified: cfe/trunk/lib/Driver/ToolChains/Arch/Mips.cpp cfe/trunk/lib/Driver

r312700 - Fix off-by-one error in block mangling.

2017-09-06 Thread Richard Smith via cfe-commits
Author: rsmith Date: Wed Sep 6 22:41:24 2017 New Revision: 312700 URL: http://llvm.org/viewvc/llvm-project?rev=312700&view=rev Log: Fix off-by-one error in block mangling. This restores the ABI prior to r214699. Modified: cfe/trunk/lib/AST/ItaniumMangle.cpp cfe/trunk/test/CodeGenObjCXX/

r312696 - [modules ts] Add test for [basic.link]p3.

2017-09-06 Thread Richard Smith via cfe-commits
Author: rsmith Date: Wed Sep 6 22:29:39 2017 New Revision: 312696 URL: http://llvm.org/viewvc/llvm-project?rev=312696&view=rev Log: [modules ts] Add test for [basic.link]p3. Added: cfe/trunk/test/CXX/modules-ts/basic/basic.link/p3.cppm Added: cfe/trunk/test/CXX/modules-ts/basic/basic.link/p

[PATCH] D37530: [MinGW] Allow overriding which version of msvcrt to link to

2017-09-06 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. In https://reviews.llvm.org/D37530#862644, @rnk wrote: > What do you think of letting people spell this as `-lmsvcrt120`? We could > forward those options and suppress our implicit addition of `-lmsvcrt` if we > see `-lmsvcr*` anywhere. That might work and would prob

[libcxx] r312693 - Add even more string_view tests. These found some bugs in the default parameter value for rfind/find_last_of/find_last_not_of

2017-09-06 Thread Marshall Clow via cfe-commits
Author: marshall Date: Wed Sep 6 21:19:32 2017 New Revision: 312693 URL: http://llvm.org/viewvc/llvm-project?rev=312693&view=rev Log: Add even more string_view tests. These found some bugs in the default parameter value for rfind/find_last_of/find_last_not_of Added: libcxx/trunk/test/std/s

[PATCH] D35533: [Basic] Update CMakeLists.txt to handle Repo with git

2017-09-06 Thread MinSeong Kim via Phabricator via cfe-commits
minseong.kim updated this revision to Diff 114115. minseong.kim edited the summary of this revision. minseong.kim added a reviewer: hintonda. minseong.kim removed a subscriber: hintonda. minseong.kim added a comment. I have updated the diff. https://reviews.llvm.org/D35533 Files: lib/Basic/CM

[libcxx] r312691 - Another missing string_view test

2017-09-06 Thread Marshall Clow via cfe-commits
Author: marshall Date: Wed Sep 6 20:03:48 2017 New Revision: 312691 URL: http://llvm.org/viewvc/llvm-project?rev=312691&view=rev Log: Another missing string_view test Added: libcxx/trunk/test/std/strings/basic.string/string.cons/string_view_assignment.pass.cpp Added: libcxx/trunk/test/std

[libcxx] r312690 - Add more string_view tests

2017-09-06 Thread Marshall Clow via cfe-commits
Author: marshall Date: Wed Sep 6 19:46:09 2017 New Revision: 312690 URL: http://llvm.org/viewvc/llvm-project?rev=312690&view=rev Log: Add more string_view tests Added: libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_insert/string_view.pass.cpp libcxx/trunk/test/std/s

[PATCH] D37548: [CUDA] When compilation fails, print the compilation mode.

2017-09-06 Thread Justin Lebar via Phabricator via cfe-commits
jlebar created this revision. Herald added a subscriber: sanjoy. That is, instead of "1 error generated", we now say "1 error generated when compiling for sm_35". This (partially) solves a usability foogtun wherein e.g. users call a function that's only defined on sm_60 when compiling for sm_35,

[PATCH] D36806: Switch to cantFail(), since it does the same assertion.

2017-09-06 Thread Stephen Hines via Phabricator via cfe-commits
srhines added a comment. Ping. https://reviews.llvm.org/D36806 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

r312684 - [modules ts] Ensure that module linkage variables are always emitted and always have their name mangled.

2017-09-06 Thread Richard Smith via cfe-commits
Author: rsmith Date: Wed Sep 6 17:55:55 2017 New Revision: 312684 URL: http://llvm.org/viewvc/llvm-project?rev=312684&view=rev Log: [modules ts] Ensure that module linkage variables are always emitted and always have their name mangled. Modified: cfe/trunk/lib/AST/Mangle.cpp cfe/trunk/l

[PATCH] D35533: [Basic] Update CMakeLists.txt to handle Repo with git

2017-09-06 Thread Don Hinton via Phabricator via cfe-commits
hintonda added a comment. In https://reviews.llvm.org/D35533#862852, @minseong.kim wrote: > @hintonda, Absolutely. Incorporating @modocache's module changes into the > version in AddLLVM.cmake would solve the current version display issue for > repo and do not affect the process of other versio

[PATCH] D37539: [CUDA] Add device overloads for non-placement new/delete.

2017-09-06 Thread Justin Lebar via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL312681: [CUDA] Add device overloads for non-placement new/delete. (authored by jlebar). Changed prior to commit: https://reviews.llvm.org/D37539?vs=114104&id=114108#toc Repository: rL LLVM https://r

[PATCH] D37540: [CUDA] Tests for device-side overloads of non-placement new/delete.

2017-09-06 Thread Justin Lebar via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL312682: [CUDA] Tests for device-side overloads of non-placement new/delete. (authored by jlebar). Changed prior to commit: https://reviews.llvm.org/D37540?vs=114094&id=114109#toc Repository: rL LLVM

r312681 - [CUDA] Add device overloads for non-placement new/delete.

2017-09-06 Thread Justin Lebar via cfe-commits
Author: jlebar Date: Wed Sep 6 17:37:20 2017 New Revision: 312681 URL: http://llvm.org/viewvc/llvm-project?rev=312681&view=rev Log: [CUDA] Add device overloads for non-placement new/delete. Summary: Tests have to live in the test-suite, and so will come in a separate patch. Fixes PR34360. Revi

[PATCH] D37529: [codeview] omit debug locations for nested exprs unless column info enabled

2017-09-06 Thread Bob Haarman via Phabricator via cfe-commits
inglorion planned changes to this revision. inglorion added a comment. rnk and I talked about a different approach. The idea is to explicitly emit locations in some cases (e.g. inside compound statements, the braces of for loops, ...), and otherwise emit locations only when emitting column info

[PATCH] D37539: [CUDA] Add device overloads for non-placement new/delete.

2017-09-06 Thread Justin Lebar via Phabricator via cfe-commits
jlebar updated this revision to Diff 114104. jlebar marked an inline comment as done. jlebar added a comment. Address review comments. https://reviews.llvm.org/D37539 Files: clang/lib/Headers/cuda_wrappers/new Index: clang/lib/Headers/cuda_wrappers/new ==

[PATCH] D37539: [CUDA] Add device overloads for non-placement new/delete.

2017-09-06 Thread Justin Lebar via Phabricator via cfe-commits
jlebar marked an inline comment as done. jlebar added inline comments. Comment at: clang/lib/Headers/cuda_wrappers/new:79 +} +__device__ void operator delete[](void *ptr, std::size_t sz) CUDA_NOEXCEPT { + ::operator delete(ptr); tra wrote: > Is std::size_t inten

[PATCH] D37544: [ubsan] Skip alignment checks which are folded away

2017-09-06 Thread Vedant Kumar via Phabricator via cfe-commits
vsk created this revision. Don't emit alignment checks which the IR constant folder throws away. I've tested this out on X86FastISel.cpp. While this doesn't decrease end-to-end compile-time significantly, it results in 122 fewer type checks (1% reduction) overall, without adding any real complexi

[PATCH] D37543: [ubsan] Add helpers to decide when null/vptr checks are required. NFC.

2017-09-06 Thread Vedant Kumar via Phabricator via cfe-commits
vsk created this revision. Adding these helpers will make a planned change simpler: [ubsan] Defer pointer type checks, then try to skip the redundant ones https://reviews.llvm.org/D37543 Files: lib/CodeGen/CGExpr.cpp lib/CodeGen/CodeGenFunction.h Index: lib/CodeGen/CodeGenFunction.h =

[PATCH] D37542: [ubsan] Save a ptrtoint when emitting alignment checks

2017-09-06 Thread Vedant Kumar via Phabricator via cfe-commits
vsk created this revision. The alignment check emits a ptrtoint instruction which can be reused in the call to the diagnostic handler. https://reviews.llvm.org/D37542 Files: lib/CodeGen/CGExpr.cpp test/CodeGen/catch-undef-behavior.c Index: test/CodeGen/catch-undef-behavior.c =

Re: r312633 - [AST] Traverse CXXOperatorCallExpr in LexicallyOrderedRecursiveASTVisitor

2017-09-06 Thread Richard Smith via cfe-commits
I am extremely uncomfortable about the direction this patch series is going. We have had two different RecursiveASTVisitors before (RecursiveASTVisitor and DataRecursiveASTVisitor), and it was a maintenance nightmare: frequently changes would be made to one of them and missed in the other one, res

[PATCH] D37539: [CUDA] Add device overloads for non-placement new/delete.

2017-09-06 Thread Artem Belevich via Phabricator via cfe-commits
tra accepted this revision. tra added inline comments. This revision is now accepted and ready to land. Comment at: clang/lib/Headers/cuda_wrappers/new:79 +} +__device__ void operator delete[](void *ptr, std::size_t sz) CUDA_NOEXCEPT { + ::operator delete(ptr);

[PATCH] D35533: [Basic] Update CMakeLists.txt to handle Repo with git

2017-09-06 Thread MinSeong Kim via Phabricator via cfe-commits
minseong.kim added a comment. @hintonda, Absolutely. Incorporating @modocache's module changes into the version in AddLLVM.cmake would solve the current version display issue for repo and do not affect the process of other version control systems (e.g. git, git-svn, svn, and git submodule). h

[PATCH] D37310: [Atomic] Merge alignment information from Decl and from Type when emit atomic expression.

2017-09-06 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: lib/CodeGen/CGAtomic.cpp:680 + alignChars = std::max(alignChars, alignDecl); +} + Just use EmitPointerWithAlignment instead of EmitScalarExpr to emit the pointer operand. Repository: rL LLVM https://revie

[PATCH] D35533: [Basic] Update CMakeLists.txt to handle Repo with git

2017-09-06 Thread Don Hinton via Phabricator via cfe-commits
hintonda added a comment. I just looked into both approaches and believe the one taken in AddLLVM.cmake is correct and handles the submodule case correctly. It uses `git rev-parse --git-dir` to find the location of the actual .git directory. Please see https://reviews.llvm.org/D31985 for detai

[PATCH] D37538: [libc++] Remove problematic ADL in container implementations.

2017-09-06 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. Looks good to me, but I'd like EricWF to also review. Comment at: include/deque:1167-1168 allocator_type& __a = __alloc(); -for (iterator __i = begin(), __e = end(); __i != __e; ++__i) -__alloc_traits::destroy(__a, _VSTD::addressof(*__i)

[PATCH] D35533: [Basic] Update CMakeLists.txt to handle Repo with git

2017-09-06 Thread Don Hinton via Phabricator via cfe-commits
hintonda added a comment. In https://reviews.llvm.org/D35533#862798, @minseong.kim wrote: > Hi~ @hintonda, > > Using using find_first_existing_file in ADDLLVM.cmake solves the cases with > repo in conjunction with https://reviews.llvm.org/D35532. However, I am not > sure it can handle @modocach

[PATCH] D37529: [codeview] omit debug locations for nested exprs unless column info enabled

2017-09-06 Thread Bob Haarman via Phabricator via cfe-commits
inglorion updated this revision to Diff 114097. inglorion marked 5 inline comments as done. inglorion added a comment. I limited the change to only calls, returns, and declarations. I also updated the test case to include a multi-variable declaration, a while loop, a for loop, and an if statement

[PATCH] D35533: [Basic] Update CMakeLists.txt to handle Repo with git

2017-09-06 Thread MinSeong Kim via Phabricator via cfe-commits
minseong.kim added a comment. Hi~ @hintonda, Using using find_first_existing_file in ADDLLVM.cmake solves the cases with repo in conjunction with https://reviews.llvm.org/D35532. However, I am not sure it can handle @modocache's git submodule cases (https://reviews.llvm.org/D34955). @modocach

[PATCH] D37400: [StaticAnalyzer] Fix failures due to the iteration order of ExplodedNode

2017-09-06 Thread Mandeep Singh Grang via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL312677: [StaticAnalyzer] Fix failures due to the iteration order of ExplodedNode (authored by mgrang). Changed prior to commit: https://reviews.llvm.org/D37400?vs=114089&id=114091#toc Repository: rL

r312677 - [StaticAnalyzer] Fix failures due to the iteration order of ExplodedNode

2017-09-06 Thread Mandeep Singh Grang via cfe-commits
Author: mgrang Date: Wed Sep 6 15:54:59 2017 New Revision: 312677 URL: http://llvm.org/viewvc/llvm-project?rev=312677&view=rev Log: [StaticAnalyzer] Fix failures due to the iteration order of ExplodedNode Summary: This fixes failures seen in the reverse iteration builder: http://lab.llvm.org:801

[PATCH] D37400: [StaticAnalyzer] Fix failures due to the iteration order of ExplodedNode

2017-09-06 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. Thank you! Anna https://reviews.llvm.org/D37400 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailm

[PATCH] D37400: [StaticAnalyzer] Fix failures due to the iteration order of ExplodedNode

2017-09-06 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang added inline comments. Comment at: include/clang/StaticAnalyzer/Core/PathSensitive/ExplodedGraph.h:407 class ExplodedNodeSet { - typedef llvm::SmallPtrSet ImplTy; + typedef llvm::SmallSetVector ImplTy; ImplTy Impl; SmallSetVector size has to be a pow

[PATCH] D37400: [StaticAnalyzer] Fix failures due to the iteration order of ExplodedNode

2017-09-06 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang updated this revision to Diff 114089. mgrang added a comment. Addressed comments. https://reviews.llvm.org/D37400 Files: include/clang/StaticAnalyzer/Core/PathSensitive/ExplodedGraph.h Index: include/clang/StaticAnalyzer/Core/PathSensitive/ExplodedGraph.h

[PATCH] D37538: [libc++] Remove problematic ADL in container implementations.

2017-09-06 Thread David L. Jones via Phabricator via cfe-commits
dlj created this revision. Herald added a subscriber: sanjoy. Herald added a reviewer: EricWF. Some container operations require ADL. For example, std::advance is required to use specific operators, which will participate in ADL. However, implementation details which rely on SFINAE should be care

[PATCH] D37400: [StaticAnalyzer] Fix failures due to the iteration order of ExplodedNode

2017-09-06 Thread Anna Zaks via Phabricator via cfe-commits
zaks.anna added a comment. Thanks for addressing the non-determinism!!! The ExplodedNodeSet is predominantly used to hold very small sets and it is used quite a bit in the analyzer. Maybe we could we use SmallSetVector here instead? https://reviews.llvm.org/D37400 _

[PATCH] D37529: [codeview] omit debug locations for nested exprs unless column info enabled

2017-09-06 Thread Zachary Turner via Phabricator via cfe-commits
zturner added inline comments. Comment at: clang/test/CodeGenCXX/debug-info-nested-exprs.cpp:44 + int a = bar(x, y) + + baz(x, z) + + qux(y, z); inglorion wrote: > zturner wrote: > > inglorion wrote: > > > zturner wrote: > > > > Can you make a

[PATCH] D37529: [codeview] omit debug locations for nested exprs unless column info enabled

2017-09-06 Thread Zachary Turner via Phabricator via cfe-commits
zturner added inline comments. Comment at: clang/lib/CodeGen/CGDebugInfo.h:65 llvm::MDNode *CurInlinedAt = nullptr; + bool LocationEnabled = true; llvm::DIType *VTablePtrType = nullptr; Can you move this line up to put it next to another bool? Not a huge

[PATCH] D37529: [codeview] omit debug locations for nested exprs unless column info enabled

2017-09-06 Thread Bob Haarman via Phabricator via cfe-commits
inglorion added inline comments. Comment at: clang/test/CodeGenCXX/debug-info-nested-exprs.cpp:44 + int a = bar(x, y) + + baz(x, z) + + qux(y, z); zturner wrote: > inglorion wrote: > > zturner wrote: > > > Can you make a function called `int fo

[PATCH] D37529: [codeview] omit debug locations for nested exprs unless column info enabled

2017-09-06 Thread Bob Haarman via Phabricator via cfe-commits
inglorion created this revision. Herald added a subscriber: aprantl. Microsoft Visual Studio expects debug locations to correspond to statements. We used to emit locations for expressions nested inside statements. This would confuse the debugger, causing it to stop multiple times on the same line

[PATCH] D37529: [codeview] omit debug locations for nested exprs unless column info enabled

2017-09-06 Thread Bob Haarman via Phabricator via cfe-commits
inglorion added inline comments. Comment at: clang/lib/CodeGen/CGStmt.cpp:45 + } + return IDL; +} inglorion wrote: > rnk wrote: > > Does MSVC accept this? I think it will emit the copy ctor call in an -O0 > > build. > I wrote this thinking that the right thing

[PATCH] D37529: [codeview] omit debug locations for nested exprs unless column info enabled

2017-09-06 Thread Zachary Turner via Phabricator via cfe-commits
zturner added inline comments. Comment at: clang/test/CodeGenCXX/debug-info-nested-exprs.cpp:44 + int a = bar(x, y) + + baz(x, z) + + qux(y, z); inglorion wrote: > zturner wrote: > > Can you make a function called `int foo()` and make this `int

r312670 - [NFC] [CSA] Move AnyFunctionCall::getRuntimeDefinition implementation to cpp.

2017-09-06 Thread George Karpenkov via cfe-commits
Author: george.karpenkov Date: Wed Sep 6 14:45:01 2017 New Revision: 312670 URL: http://llvm.org/viewvc/llvm-project?rev=312670&view=rev Log: [NFC] [CSA] Move AnyFunctionCall::getRuntimeDefinition implementation to cpp. Differential Revision: https://reviews.llvm.org/D37499 Modified: cfe/tr

r312671 - [CSA] [NFC] Move AnalysisContext.h to AnalysisDeclContext.h

2017-09-06 Thread George Karpenkov via cfe-commits
Author: george.karpenkov Date: Wed Sep 6 14:45:03 2017 New Revision: 312671 URL: http://llvm.org/viewvc/llvm-project?rev=312671&view=rev Log: [CSA] [NFC] Move AnalysisContext.h to AnalysisDeclContext.h The implementation is in AnalysisDeclContext.cpp and the class is called AnalysisDeclContext.

[PATCH] D37531: Add an usage example of BreakBeforeBraces

2017-09-06 Thread Sylvestre Ledru via Phabricator via cfe-commits
sylvestre.ledru created this revision. https://reviews.llvm.org/D37531 Files: docs/ClangFormatStyleOptions.rst Index: docs/ClangFormatStyleOptions.rst === --- docs/ClangFormatStyleOptions.rst +++ docs/ClangFormatStyleOptions.rst

[PATCH] D37530: [MinGW] Allow overriding which version of msvcrt to link to

2017-09-06 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added a comment. What do you think of letting people spell this as `-lmsvcrt120`? We could forward those options and suppress our implicit addition of `-lmsvcrt` if we see `-lmsvcr*` anywhere. Comment at: lib/Driver/ToolChains/MinGW.cpp:161 if (TC.getArch() == llvm

[PATCH] D37529: [codeview] omit debug locations for nested exprs unless column info enabled

2017-09-06 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added inline comments. Comment at: clang/test/CodeGenCXX/debug-info-nested-exprs.cpp:12 + +// NONEST: call i32 @{{.*}}bar{{.*}}, !dbg ![[LOC:[0-9]+]] +// NONEST: call i32 @{{.*}}baz{{.*}}, !dbg ![[LOC]] inglorion wrote: > rnk wrote: > > This is pretty painful

[PATCH] D37529: [codeview] omit debug locations for nested exprs unless column info enabled

2017-09-06 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added a subscriber: echristo. rnk added inline comments. Comment at: clang/lib/CodeGen/CGStmt.cpp:38 +InhibitDebugLocation CodeGenFunction::EmitStmtStopPoint(const Stmt *S) { + InhibitDebugLocation IDL; "Stop point" is a hold-over from the llvm.dbg.stoppoi

[PATCH] D37529: [codeview] omit debug locations for nested exprs unless column info enabled

2017-09-06 Thread Bob Haarman via Phabricator via cfe-commits
inglorion added inline comments. Comment at: clang/lib/CodeGen/CGStmt.cpp:45 + } + return IDL; +} rnk wrote: > Does MSVC accept this? I think it will emit the copy ctor call in an -O0 > build. I wrote this thinking that the right thing would happen under copy

[PATCH] D37530: [MinGW] Allow overriding which version of msvcrt to link to

2017-09-06 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo created this revision. This allows linking to e.g. msvcr120.dll or ucrtbase.dll instead of the unversioned (and officially unsupported) msvcrt.dll. In GCC setups, this can be overridden by using custom spec files, but this isn't supported in clang. This is just an initial attempt at im

[PATCH] D37529: [codeview] omit debug locations for nested exprs unless column info enabled

2017-09-06 Thread Bob Haarman via Phabricator via cfe-commits
inglorion updated this revision to Diff 114060. inglorion added a comment. removed accidentally left in include and reformatted mangled comment https://reviews.llvm.org/D37529 Files: clang/lib/CodeGen/CGDebugInfo.cpp clang/lib/CodeGen/CGDebugInfo.h clang/lib/CodeGen/CGStmt.cpp clang/lib

r312665 - [modules ts] Emit global variables in a module interface unit as part of that unit, not in importers.

2017-09-06 Thread Richard Smith via cfe-commits
Author: rsmith Date: Wed Sep 6 13:01:14 2017 New Revision: 312665 URL: http://llvm.org/viewvc/llvm-project?rev=312665&view=rev Log: [modules ts] Emit global variables in a module interface unit as part of that unit, not in importers. Modified: cfe/trunk/include/clang/Serialization/ASTReader

[PATCH] D36150: [clangd] LSP extension to switch between source/header file

2017-09-06 Thread William Enright via Phabricator via cfe-commits
Nebiroth updated this revision to Diff 114054. Nebiroth added a comment. Some more code cleanup. https://reviews.llvm.org/D36150 Files: clangd/ClangdLSPServer.cpp clangd/ClangdServer.cpp clangd/ClangdServer.h clangd/ProtocolHandlers.cpp clangd/ProtocolHandlers.h Index: clangd/Protoco

[PATCH] D36150: [clangd] LSP extension to switch between source/header file

2017-09-06 Thread William Enright via Phabricator via cfe-commits
Nebiroth updated this revision to Diff 114048. Nebiroth added a comment. Remove unintentional file addition Updating D36150: [clangd] LSP extension to switch between source/header file ll# https://reviews.llvm.org/D36

[PATCH] D36150: [clangd] LSP extension to switch between source/header file

2017-09-06 Thread William Enright via Phabricator via cfe-commits
Nebiroth updated this revision to Diff 114046. Nebiroth added a comment. Refactored switchSourceHeader function help from ilya Added helper function to check for uppercase on current file. https://reviews.llvm.org/D36150 Files: clangd/ClangdLSPServer.cpp clangd/ClangdServer.cpp clangd/Cla

[PATCH] D37231: Add half load and store builtins

2017-09-06 Thread Jan Vesely via Phabricator via cfe-commits
jvesely marked 2 inline comments as done. jvesely added inline comments. Comment at: test/CodeGenOpenCL/no-half.cl:27 + foo[0] = __builtin_load_halff(bar); +// CHECK: [[HALF_VAL:%.*]] = load +// CHECK: [[FULL_VAL:%.*]] = fpext half [[HALF_VAL]] to float Ana

[PATCH] D37231: Add half load and store builtins

2017-09-06 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: test/CodeGenOpenCL/no-half.cl:27 + foo[0] = __builtin_load_halff(bar); +// CHECK: [[HALF_VAL:%.*]] = load +// CHECK: [[FULL_VAL:%.*]] = fpext half [[HALF_VAL]] to float jvesely wrote: > Anastasia wrote: > > Minor

[PATCH] D36410: [OpenCL] Handle taking address of block captures

2017-09-06 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. In https://reviews.llvm.org/D36410#856907, @bader wrote: > In https://reviews.llvm.org/D36410#856716, @yaxunl wrote: > > > The captured variable is still passed by value. The address taking is on > > the duplicate of the captured variable, not on the original variable.

[PATCH] D37400: [StaticAnalyzer] Fix failures due to the iteration order of ExplodedNode

2017-09-06 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang added a comment. Ping for reviews please. https://reviews.llvm.org/D37400 ___ 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-09-06 Thread Devin Coughlin via Phabricator via cfe-commits
dcoughlin added a comment. Thanks Gabor! Some additional comments in line. Comment at: include/clang/CrossTU/CrossTranslationUnit.h:118 + /// + /// \return Returns a map with the loaded AST Units and the declarations + /// with the definitions. Is this comme

[PATCH] D37493: Fix ARM bare metal driver to support atomics

2017-09-06 Thread Jonathan Roelofs via Phabricator via cfe-commits
jroelofs closed this revision. jroelofs added a comment. r312651 https://reviews.llvm.org/D37493 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

r312651 - Fix ARM bare metal driver to support atomics

2017-09-06 Thread Jonathan Roelofs via cfe-commits
Author: jroelofs Date: Wed Sep 6 10:09:25 2017 New Revision: 312651 URL: http://llvm.org/viewvc/llvm-project?rev=312651&view=rev Log: Fix ARM bare metal driver to support atomics The new bare metal support only supports the single thread model. This causes the builtin atomic functions (e.g.: __a

[PATCH] D36527: Implemented P0428R2 - Familiar template syntax for generic lambdas

2017-09-06 Thread Hamza Sood via Phabricator via cfe-commits
hamzasood added a comment. Ping https://reviews.llvm.org/D36527 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D37496: Fix validation of the -mthread-model flag in the Clang driver

2017-09-06 Thread Ian Tessier via Phabricator via cfe-commits
itessier added a comment. In https://reviews.llvm.org/D37496#861746, @compnerd wrote: > The change looks good. Can you please add some test cases for this? Or do > existing test cases cover this already? Should have added this to the description, but yes there are existing tests that cover

[PATCH] D37493: Fix ARM bare metal driver to support atomics

2017-09-06 Thread Jonathan Roelofs via Phabricator via cfe-commits
jroelofs added a comment. Sure. I'll commit it for you once this build/test cycle is finished. https://reviews.llvm.org/D37493 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D37521: [Sema][Typo correction] Assertion failure in typo correction if chain of member function calls has multiple typos

2017-09-06 Thread Oleg Ranevskyy via Phabricator via cfe-commits
iid_iunknown created this revision. This is a patch proposal for PR34507. Typo resolution can create new TypoExprs while transforming an expression. These TypoExprs are not transformed, they are present in the resulting expression and cause the `DelayedTypos.empty() && "Uncorrected typos!"` as

[PATCH] D37310: [Atomic] Merge alignment information from Decl and from Type when emit atomic expression.

2017-09-06 Thread Wei Mi via Phabricator via cfe-commits
wmi added a comment. Ping Repository: rL LLVM https://reviews.llvm.org/D37310 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D37302: [Headers] Define *_HAS_SUBNORM for FLT, DBL, LDBL

2017-09-06 Thread Pirama Arumuga Nainar via Phabricator via cfe-commits
pirama added a comment. Ping... https://reviews.llvm.org/D37302 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

r312642 - [OPENMP] Fix for PR33922: New ident_t flags for

2017-09-06 Thread Alexey Bataev via cfe-commits
Author: abataev Date: Wed Sep 6 09:17:35 2017 New Revision: 312642 URL: http://llvm.org/viewvc/llvm-project?rev=312642&view=rev Log: [OPENMP] Fix for PR33922: New ident_t flags for __kmpc_for_static_fini(). Added special flags for calls of __kmpc_for_static_fini(), like previous ly for __kmpc_fo

[PATCH] D37474: [PCH] Allow VFS to be used for tests that generate PCH files

2017-09-06 Thread Cameron via Phabricator via cfe-commits
cameron314 updated this revision to Diff 114016. cameron314 added a comment. Here's an updated patch that allows only the PCH to be accessed from the real FS when a VSF is present. Tests still pass. https://reviews.llvm.org/D37474 Files: lib/Frontend/ASTUnit.cpp unittests/Frontend/CMakeLis

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

2017-09-06 Thread Sjoerd Meijer via Phabricator via cfe-commits
SjoerdMeijer added a comment. I am going to commit this within a few days. That looks reasonable to me given that the comments in the last reviews were very minor (which I have of course addressed already). Also, in case of issues, I am guessing fixes and/or addition can be easily done post-com

Re: [PATCH] D36998: [AST] Traverse templates in LexicallyOrderedRecursiveASTVisitor

2017-09-06 Thread Aaron Ballman via cfe-commits
On Wed, Sep 6, 2017 at 11:22 AM, Philip Douglas via Phabricator via cfe-commits wrote: > pdouglas added a comment. > > Hi, > > This change is not building on Windows, because the Visual C++ compiler > doesn't support `or` (instead of `||`) by default. (See > https://msdn.microsoft.com/en-us/libr

[PATCH] D36998: [AST] Traverse templates in LexicallyOrderedRecursiveASTVisitor

2017-09-06 Thread Philip Douglas via Phabricator via cfe-commits
pdouglas added a comment. Hi, This change is not building on Windows, because the Visual C++ compiler doesn't support `or` (instead of `||`) by default. (See https://msdn.microsoft.com/en-us/library/f355wky8.aspx#Operator%20Keyword%20for%20||) C:\b\slave\clang-x86-windows-msvc2015\clang-x86

r312639 - Replacing "or" with "||" to appease MSVC.

2017-09-06 Thread Aaron Ballman via cfe-commits
Author: aaronballman Date: Wed Sep 6 08:12:05 2017 New Revision: 312639 URL: http://llvm.org/viewvc/llvm-project?rev=312639&view=rev Log: Replacing "or" with "||" to appease MSVC. Modified: cfe/trunk/unittests/Tooling/LexicallyOrderedRecursiveASTVisitorTest.cpp Modified: cfe/trunk/unittest

[PATCH] D37101: [clangd] Add support for snippet completions

2017-09-06 Thread Raoul Wols via Phabricator via cfe-commits
rwols marked an inline comment as done. rwols added inline comments. Comment at: clangd/tool/ClangdMain.cpp:33 + "present plaintext completions."), +llvm::cl::init(false)); + ilya-biryukov wrote: > After putti

[PATCH] D37101: [clangd] Add support for snippet completions

2017-09-06 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Comment at: clangd/ClangdUnit.cpp:376 + +CompletionItem Item{InsertTextFormat::PlainText}; + rwols wrote: > ilya-biryukov wrote: > > Implementations of this function in `PlainTextCompletionItemsCollector` and > > `Snippet

r312638 - [OPENMP] Fix for PR34445: Reduction initializer segfaults at runtime in

2017-09-06 Thread Alexey Bataev via cfe-commits
Author: abataev Date: Wed Sep 6 07:49:58 2017 New Revision: 312638 URL: http://llvm.org/viewvc/llvm-project?rev=312638&view=rev Log: [OPENMP] Fix for PR34445: Reduction initializer segfaults at runtime in move constructor. Previously user-defined reduction initializer was considered as an assign

[PATCH] D37474: [PCH] Allow VFS to be used for tests that generate PCH files

2017-09-06 Thread Cameron via Phabricator via cfe-commits
cameron314 added a comment. I'll change the overlay to only allow access to the PCH. I agree that it would be nice to only read the PCH using real filesystem APIs in order to be symmetrical, but this seems non-trivial. It also feels like a step in the wrong direction -- ideally the VFS would ho

[PATCH] D37491: [Preamble] Fixed preamble breaking with BOM presence (and particularly, fluctuating BOM presence)

2017-09-06 Thread Cameron via Phabricator via cfe-commits
cameron314 added a comment. Thanks for the response! > How are various preprocessor offests (and SourceLocation offsets) are > calculated? Do they account for BOM presence and ignore it? Everything is in byte offsets; the `SourceLocation` after the BOM is not the same as before the BOM. The le

[PATCH] D37479: run-clang-tidy: Report progress

2017-09-06 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. I think CMake output is good model for run-clang-tidy. https://reviews.llvm.org/D37479 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D35533: [Basic] Update CMakeLists.txt to handle Repo with git

2017-09-06 Thread Don Hinton via Phabricator via cfe-commits
hintonda added a comment. Now that 36971 has been committed, I believe you can just remove the `find_first_existing_file` and `find_first_existing_vc_file` macro definitions from this file. https://reviews.llvm.org/D35533 ___ cfe-commits mailing l

[PATCH] D37150: [clangd] Command line arg to specify compile_commands.json path

2017-09-06 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. See my comments. Could you also `clang-format` the code please? Comment at: clangd/ClangdServer.cpp:150 bool RunSynchronously, + std::string CompileCommands, llvm::O

[PATCH] D37513: [clang-format] Fix documentation for AllowAllParametersOfDeclarationOnNextLine

2017-09-06 Thread Daniel Jasper via Phabricator via cfe-commits
djasper added a comment. Note that these changes need to be made to the corresponding comments in include/clang/Format/Format.h and then this file is auto-generated with docs/tools/dump_format_style.py. Comment at: docs/ClangFormatStyleOptions.rst:274 **AllowAllParametersOfD

[PATCH] D37383: [AST] Add TableGen for StmtDataCollectors

2017-09-06 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL312634: [AST] Add TableGen for StmtDataCollectors (authored by krobelus). Changed prior to commit: https://reviews.llvm.org/D37383?vs=113547&id=114000#toc Repository: rL LLVM https://reviews.llvm.or

r312634 - [AST] Add TableGen for StmtDataCollectors

2017-09-06 Thread Johannes Altmanninger via cfe-commits
Author: krobelus Date: Wed Sep 6 06:20:51 2017 New Revision: 312634 URL: http://llvm.org/viewvc/llvm-project?rev=312634&view=rev Log: [AST] Add TableGen for StmtDataCollectors Summary: This adds an option "-gen-clang-data-collectors" to the Clang TableGen that is used to generate StmtDataCollect

[PATCH] D37513: [clang-format] Fix documentation for AllowAllParametersOfDeclarationOnNextLine

2017-09-06 Thread Lucja Mazur via Phabricator via cfe-commits
LuMa updated this revision to Diff 113998. https://reviews.llvm.org/D37513 Files: docs/ClangFormatStyleOptions.rst Index: docs/ClangFormatStyleOptions.rst === --- docs/ClangFormatStyleOptions.rst +++ docs/ClangFormatStyleOptions.

[PATCH] D37479: run-clang-tidy: Report progress

2017-09-06 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/tool/run-clang-tidy.py:155 args.quiet) -sys.stdout.write(' '.join(invocation) + '\n') +sys.

r312633 - [AST] Traverse CXXOperatorCallExpr in LexicallyOrderedRecursiveASTVisitor

2017-09-06 Thread Johannes Altmanninger via cfe-commits
Author: krobelus Date: Wed Sep 6 06:12:11 2017 New Revision: 312633 URL: http://llvm.org/viewvc/llvm-project?rev=312633&view=rev Log: [AST] Traverse CXXOperatorCallExpr in LexicallyOrderedRecursiveASTVisitor Summary: This affects overloaded operators, which are represented by a CXXOperatorCallEx

[PATCH] D37200: [AST] Traverse CXXOperatorCallExpr in LexicallyOrderedRecursiveASTVisitor

2017-09-06 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL312633: [AST] Traverse CXXOperatorCallExpr in LexicallyOrderedRecursiveASTVisitor (authored by krobelus). Changed prior to commit: https://reviews.llvm.org/D37200?vs=112951&id=113999#toc Repository:

[PATCH] D36998: [AST] Traverse templates in LexicallyOrderedRecursiveASTVisitor

2017-09-06 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL312631: [AST] Traverse templates in LexicallyOrderedRecursiveASTVisitor (authored by krobelus). Repository: rL LLVM https://reviews.llvm.org/D36998 Files: cfe/trunk/include/clang/AST/LexicallyOrdere

r312631 - [AST] Traverse templates in LexicallyOrderedRecursiveASTVisitor

2017-09-06 Thread Johannes Altmanninger via cfe-commits
Author: krobelus Date: Wed Sep 6 06:11:13 2017 New Revision: 312631 URL: http://llvm.org/viewvc/llvm-project?rev=312631&view=rev Log: [AST] Traverse templates in LexicallyOrderedRecursiveASTVisitor Summary: We need to specialize this because RecursiveASTVisitor visits template template parameter

[PATCH] D37383: [AST] Add TableGen for StmtDataCollectors

2017-09-06 Thread Raphael Isemann via Phabricator via cfe-commits
teemperor accepted this revision. teemperor added a comment. This revision is now accepted and ready to land. @johannes The blocking reviewer is because it touches clone detection code :) Fine with me, I have some comments on things but nothing that affects this review. LGTM! https://reviews.l

[PATCH] D37513: [clang-format] Fix documentation for AllowAllParametersOfDeclarationOnNextLine

2017-09-06 Thread Lucja Mazur via Phabricator via cfe-commits
LuMa updated this revision to Diff 113995. https://reviews.llvm.org/D37513 Files: docs/ClangFormatStyleOptions.rst Index: docs/ClangFormatStyleOptions.rst === --- docs/ClangFormatStyleOptions.rst +++ docs/ClangFormatStyleOptions.

[PATCH] D37383: [AST] Add TableGen for StmtDataCollectors

2017-09-06 Thread Johannes Altmanninger via Phabricator via cfe-commits
johannes added a comment. @teemperor ok for you? did phabricator make you a blocking reviewer because of the affected code, or did I do that somehow? https://reviews.llvm.org/D37383 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lis

[PATCH] D37478: [analyzer] Implement pointer arithmetic on constants

2017-09-06 Thread Rafael Stahl via Phabricator via cfe-commits
r.stahl added a comment. To be honest I was quite surprised that this change in behavior didn't cause more test failures, because for detecting null dereferences the old behavior is definitely more useful. Since it did not, I was convinced that this change is desired. We use the analyzer for f

[PATCH] D36574: [refactor] add clang-refactor tool with initial testing support and local-rename action

2017-09-06 Thread Eric Liu via Phabricator via cfe-commits
ioeric added inline comments. Comment at: tools/clang-refactor/ClangRefactor.cpp:103 +IsSelectionParsed = true; +// FIXME: Support true selection ranges. +StringRef Value = *Selection; arphaman wrote: > ioeric wrote: > > Is the test selection temporar

[PATCH] D37513: [clang-format] Fix documentation for AllowAllParametersOfDeclarationOnNextLine

2017-09-06 Thread Lucja Mazur via Phabricator via cfe-commits
LuMa created this revision. Current description of flag AllowAllParametersOfDeclarationOnNextLine in Clang-Format Style Options guide suggests that it is possible to format function declaration, which fits in a single line (what is not supported in current clang-format version). Also example is

[PATCH] D37478: [analyzer] Implement pointer arithmetic on constants

2017-09-06 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. I've seen this recently, and while i agree that the fix is correct, i'm not entirely sure that the test cases are correct. As weird as this may sound, null dereference is not an attempt to read from or write to memory address 0. Instead, it is about using a null pointer as

  1   2   >