r304523 - Mangle __unaligned in Itanium ABI

2017-06-02 Thread Roger Ferrer Ibanez via cfe-commits
Author: rogfer01 Date: Fri Jun 2 02:14:34 2017 New Revision: 304523 URL: http://llvm.org/viewvc/llvm-project?rev=304523&view=rev Log: Mangle __unaligned in Itanium ABI __unaligned is not currently mangled in any way in the Itanium ABI. This causes failures when using -fms-extensions and C++ in t

[PATCH] D33398: Mangle __unaligned in Itanium ABI

2017-06-02 Thread Roger Ferrer Ibanez via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL304523: Mangle __unaligned in Itanium ABI (authored by rogfer01). Changed prior to commit: https://reviews.llvm.org/D33398?vs=100974&id=101171#toc Repository: rL LLVM https://reviews.llvm.org/D33398

[PATCH] D33526: Fix spurious Wunused-lambda-capture warning

2017-06-02 Thread Malcolm Parsons via Phabricator via cfe-commits
malcolm.parsons added inline comments. Comment at: lib/Sema/SemaLambda.cpp:1525-1526 + if (!CurContext->isDependentContext() && !IsImplicit) +if ((IsGenericLambda && !From.isNonODRUsed()) || +(!IsGenericLambda && !From.isODRUsed())) + DiagnoseUnu

r304524 - Remove file that I forgot to remove as part of rL304523

2017-06-02 Thread Roger Ferrer Ibanez via cfe-commits
Author: rogfer01 Date: Fri Jun 2 02:21:27 2017 New Revision: 304524 URL: http://llvm.org/viewvc/llvm-project?rev=304524&view=rev Log: Remove file that I forgot to remove as part of rL304523 Removed: cfe/trunk/test/CodeGenCXX/unaligned-duplicated-mangle-name.cpp Removed: cfe/trunk/test/Code

[PATCH] D33537: [clang-tidy] Exception Escape Checker

2017-06-02 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware added a comment. In https://reviews.llvm.org/D33537#770264, @aaron.ballman wrote: > I think we should try to get as much of this functionality in > https://reviews.llvm.org/D3 as possible; there is a considerable amount > of overlap between that functionality and this fun

[clang-tools-extra] r304534 - clang-rename: add new -force option

2017-06-02 Thread Miklos Vajna via cfe-commits
Author: vmiklos Date: Fri Jun 2 04:32:28 2017 New Revision: 304534 URL: http://llvm.org/viewvc/llvm-project?rev=304534&view=rev Log: clang-rename: add new -force option Summary: The use-case is when renaming a widely used name, like a lower-level class in a codebase and clang-rename is s

r304535 - clang/test/CodeGenCXX/unaligned-member-qualifier.cpp: Satisfy x86_thiscallcc.

2017-06-02 Thread NAKAMURA Takumi via cfe-commits
Author: chapuni Date: Fri Jun 2 04:53:05 2017 New Revision: 304535 URL: http://llvm.org/viewvc/llvm-project?rev=304535&view=rev Log: clang/test/CodeGenCXX/unaligned-member-qualifier.cpp: Satisfy x86_thiscallcc. Modified: cfe/trunk/test/CodeGenCXX/unaligned-member-qualifier.cpp Modified: cfe

[PATCH] D33721: [ARM] Add support for target("arm") and target("thumb").

2017-06-02 Thread Florian Hahn via Phabricator via cfe-commits
fhahn added inline comments. Comment at: lib/Basic/Targets.cpp:5439-5442 +// [-|+]thumb-mode target features respectively. +std::vector UpdatedFeaturesVec(FeaturesVec); +for (auto &Feature : UpdatedFeaturesVec) { + if (Feature.compare("+arm") == 0) --

[PATCH] D33821: [OpenCL] Harden function pointer diagnostics.

2017-06-02 Thread Alexey Bader via Phabricator via cfe-commits
bader created this revision. Improve OpenCL type checking by rejecting function pointer types. https://reviews.llvm.org/D33821 Files: include/clang/Basic/DiagnosticSemaKinds.td lib/Sema/SemaDecl.cpp lib/Sema/SemaType.cpp test/SemaOpenCL/func.cl Index: test/SemaOpenCL/func.cl =

[PATCH] D33357: Avoid calling report_fatal_error in the destructor of raw_fd_ostream when saving a module timestamp file

2017-06-02 Thread Alex Lorenz via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL304538: Avoid calling report_fatal_error in the destructor of raw_fd_ostream (authored by arphaman). Changed prior to commit: https://reviews.llvm.org/D33357?vs=99904&id=101182#toc Repository: rL LLV

r304538 - Avoid calling report_fatal_error in the destructor of raw_fd_ostream

2017-06-02 Thread Alex Lorenz via cfe-commits
Author: arphaman Date: Fri Jun 2 05:36:56 2017 New Revision: 304538 URL: http://llvm.org/viewvc/llvm-project?rev=304538&view=rev Log: Avoid calling report_fatal_error in the destructor of raw_fd_ostream when saving a module timestamp file This commit doesn't include a test as it requires a test

[PATCH] D33304: [clang-tidy][Part1] Add a new module Android and three new checks.

2017-06-02 Thread Haojian Wu via Phabricator via cfe-commits
hokein added a comment. Thanks for the contributions. All your three checks are not android specific -- because they are checking POSIX APIs (`open`, `creat`, `fopen`), which are more likely related to POSIX. So personally, I'm +1 on a "posix" module, instead of "android", but wait to see othe

[PATCH] D32178: Delete unstable integration tests

2017-06-02 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added a comment. Sorry for the delay, was on vacation. Committing today. https://reviews.llvm.org/D32178 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

r304542 - Tie the macOS tests in test/Integration to the latest macOS SDK

2017-06-02 Thread Alex Lorenz via cfe-commits
Author: arphaman Date: Fri Jun 2 06:26:35 2017 New Revision: 304542 URL: http://llvm.org/viewvc/llvm-project?rev=304542&view=rev Log: Tie the macOS tests in test/Integration to the latest macOS SDK This change will ensure that these tests won't fail when a new SDK that utilizes new compiler feat

[PATCH] D32178: Delete unstable integration tests

2017-06-02 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added a comment. Committed r304541 & r304542. https://reviews.llvm.org/D32178 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D33825: [clang-tidy] signal handler must be plain old function check

2017-06-02 Thread Eniko Donatella Toth via Phabricator via cfe-commits
NorenaLeonetti created this revision. NorenaLeonetti added a project: clang-tools-extra. Herald added subscribers: xazax.hun, mgorny. Based on CERT-MSC54-CPP Repository: rL LLVM https://reviews.llvm.org/D33825 Files: clang-tidy/cert/CERTTidyModule.cpp clang-tidy/cert/CMakeLists.txt cla

[PATCH] D33788: Return a canonical path from getClangResourcePath()

2017-06-02 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In https://reviews.llvm.org/D33788#771070, @bruno wrote: > Hi Aaron, > > Nice catch! Any chance you can add a testcase to this? There's already a test case that covers this: Index/pch-from-libclang.c -- it was failing on OS X 10.6 for us. If you have a better tes

[PATCH] D33537: [clang-tidy] Exception Escape Checker

2017-06-02 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In https://reviews.llvm.org/D33537#771159, @baloghadamsoftware wrote: > In https://reviews.llvm.org/D33537#770264, @aaron.ballman wrote: > > > I think we should try to get as much of this functionality in > > https://reviews.llvm.org/D3 as possible; there is a

[PATCH] D33826: [clang-tidy] avoid pointer cast to more strict alignment check

2017-06-02 Thread Eniko Donatella Toth via Phabricator via cfe-commits
NorenaLeonetti created this revision. NorenaLeonetti added a project: clang-tools-extra. Herald added subscribers: xazax.hun, mgorny. Based on CERT-EXP36-C Repository: rL LLVM https://reviews.llvm.org/D33826 Files: clang-tidy/cert/AvoidPointerCastToMoreStrictAlignmentCheck.cpp clang-tidy

[PATCH] D33827: [clang-tidy] misc-static-assert shouldn't flag assert(!"msg")

2017-06-02 Thread Florian Gross via Phabricator via cfe-commits
fgross created this revision. Herald added a subscriber: xazax.hun. Added negated string literals to the set of IsAlwaysFalse expressions to avoid flagging of assert(!"msg") https://reviews.llvm.org/D33827 Files: clang-tidy/misc/StaticAssertCheck.cpp test/clang-tidy/misc-static-assert.c

[PATCH] D33828: [analyzer] Don't crash when the code tries to construct an Objective-C object in AllocaRegion.

2017-06-02 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ created this revision. Herald added a subscriber: xazax.hun. The analyzer crashes when the user tries to allocate stack memory through `alloca()` and then construct an Objective-C object in it. The `alloca()` function is handled in the analyzer by its own concrete untyped memory region, `Al

[PATCH] D33735: [DebugInfo] Add ThisOrSelf attribute for emission of FlagObjectPointer.

2017-06-02 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev updated this revision to Diff 101199. ABataev added a comment. Updates after review https://reviews.llvm.org/D33735 Files: include/clang/AST/Decl.h lib/AST/Decl.cpp lib/AST/DeclObjC.cpp lib/CodeGen/CGCXXABI.cpp lib/CodeGen/CGDebugInfo.cpp lib/Serialization/ASTReaderDecl.cpp

[PATCH] D33826: [clang-tidy] avoid pointer cast to more strict alignment check

2017-06-02 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added inline comments. Comment at: test/clang-tidy/cert-avoid-pointer-cast-to-more-strict-alignment.c:17 + + tmp = (struct foo_header *)(data + offset); + // CHECK-MESSAGES: :[[@LINE-1]]:9: warning: do not cast pointers into more strictly aligned pointer types [ce

[PATCH] D33478: [libclang] When getting platform availabilities, merge multiple declarations if possible

2017-06-02 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added inline comments. Comment at: tools/libclang/CIndex.cpp:7287 + if (!HadAvailAttr) if (const EnumConstantDecl *EnumConst = dyn_cast(D)) I think that you can move this `if` before the new `if`, and convert the new `if` to be an `if (Availabil

[PATCH] D33833: Fix Clang assertion on template destructor declaration

2017-06-02 Thread Kuang He via Phabricator via cfe-commits
kuang_he created this revision. This patch aim to fix bug reported at https://bugs.llvm.org/show_bug.cgi?id=33189. Clang hit assertion on template destructor declaration https://reviews.llvm.org/D33833 Files: lib/AST/DeclCXX.cpp test/SemaCXX/PR33189.cpp Index: test/SemaCXX/PR33189.cpp =

r304553 - ASTPrinter: Objective-C method declarations don't need a space after

2017-06-02 Thread Alex Lorenz via cfe-commits
Author: arphaman Date: Fri Jun 2 10:02:59 2017 New Revision: 304553 URL: http://llvm.org/viewvc/llvm-project?rev=304553&view=rev Log: ASTPrinter: Objective-C method declarations don't need a space after the return type rdar://32332039 Modified: cfe/trunk/lib/AST/DeclPrinter.cpp cfe/trun

[PATCH] D33821: [OpenCL] Harden function pointer diagnostics.

2017-06-02 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. LGTM. Thanks. https://reviews.llvm.org/D33821 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D33706: CodeGen: Cast temporary variable to proper address space

2017-06-02 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl updated this revision to Diff 101221. yaxunl marked 7 inline comments as done. yaxunl added a comment. Revised by John's comments. https://reviews.llvm.org/D33706 Files: lib/CodeGen/CGCall.cpp lib/CodeGen/CGDecl.cpp lib/CodeGen/CGExpr.cpp lib/CodeGen/CodeGenFunction.h test/Code

[PATCH] D33497: [clang-tidy] check for __func__/__FUNCTION__ in lambdas

2017-06-02 Thread Bryce Liu via Phabricator via cfe-commits
brycel updated this revision to Diff 101223. brycel marked 4 inline comments as done. brycel added a comment. Addressed comments from alexfh. In particular, changed to using a set from a vector. https://reviews.llvm.org/D33497 Files: clang-tidy/misc/CMakeLists.txt clang-tidy/misc/LambdaFun

[libclc] r304556 - generic: add missing get_work_dim include

2017-06-02 Thread Jan Vesely via cfe-commits
Author: jvesely Date: Fri Jun 2 10:58:35 2017 New Revision: 304556 URL: http://llvm.org/viewvc/llvm-project?rev=304556&view=rev Log: generic: add missing get_work_dim include Fixes few piglits since clang r304193 Signed-off-by: Jan Vesely Reviewed-by: Aaron Watry Modified: libclc/trunk/g

[PATCH] D33333: Emit warning when throw exception in destruct or dealloc functions which has a (possible implicit) noexcept specifier

2017-06-02 Thread Jennifer Yu via Phabricator via cfe-commits
jyu2 marked 2 inline comments as done. jyu2 added inline comments. Comment at: lib/Sema/AnalysisBasedWarnings.cpp:334 + continue; +else + HasThrowOutFunc = true; jyu2 wrote: > aaron.ballman wrote: > > You can drop the `else` here and just set `HasTh

[PATCH] D33497: [clang-tidy] check for __func__/__FUNCTION__ in lambdas

2017-06-02 Thread Bryce Liu via Phabricator via cfe-commits
brycel updated this revision to Diff 101224. brycel added a comment. Move namespace-level types to class-level to avoid potential future name conflicts. https://reviews.llvm.org/D33497 Files: clang-tidy/misc/CMakeLists.txt clang-tidy/misc/LambdaFunctionNameCheck.cpp clang-tidy/misc/Lambd

[PATCH] D33706: CodeGen: Cast temporary variable to proper address space

2017-06-02 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. Thanks. One tweak and then LGTM. Comment at: lib/CodeGen/CodeGenFunction.h:1937 + /// to the stack. + + /// Because the address of a temporary is often exposed to the program in This line should have ///. https://reviews.llvm.org/

[PATCH] D33706: CodeGen: Cast temporary variable to proper address space

2017-06-02 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl updated this revision to Diff 101227. yaxunl added a comment. Fix a comment. https://reviews.llvm.org/D33706 Files: lib/CodeGen/CGCall.cpp lib/CodeGen/CGDecl.cpp lib/CodeGen/CGExpr.cpp lib/CodeGen/CodeGenFunction.h test/CodeGen/address-space.c test/CodeGen/default-address-spa

[PATCH] D33304: [clang-tidy][Part1] Add a new module Android and three new checks.

2017-06-02 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added a comment. In https://reviews.llvm.org/D33304#771215, @hokein wrote: > Thanks for the contributions. > > All your three checks are not android specific -- because they are checking > POSIX APIs (`open`, `creat`, `fopen`), which are more likely related to > POSIX. So personally, I'm

[PATCH] D33735: [DebugInfo] Add ThisOrSelf attribute for emission of FlagObjectPointer.

2017-06-02 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: include/clang/AST/Decl.h:1388 SourceLocation IdLoc, IdentifierInfo *Id, - QualType T); + QualType T, bool IsThisOrSelf = false); -

[PATCH] D33706: CodeGen: Cast temporary variable to proper address space

2017-06-02 Thread John McCall via Phabricator via cfe-commits
rjmccall accepted this revision. rjmccall added a comment. This revision is now accepted and ready to land. Thanks! https://reviews.llvm.org/D33706 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinf

[PATCH] D33788: Return a canonical path from getClangResourcePath()

2017-06-02 Thread Argyrios Kyrtzidis via Phabricator via cfe-commits
akyrtzi added a comment. Getting the real path is notoriously slow (at least it's horrible in OSX, not sure about linux). Since this is about dropping the '/../' part, could we do some simple canonicalization of removing the dots ? Not sure if there is an existing function that does that. htt

[PATCH] D33478: [libclang] When getting platform availabilities, merge multiple declarations if possible

2017-06-02 Thread Ronald Wampler via Phabricator via cfe-commits
rdwampler added inline comments. Comment at: tools/libclang/CIndex.cpp:7322 + + for (int I = 0, E = AvailabilityAttrs.size(); I < E && I < availability_size; + ++I) { arphaman wrote: > You can use a ranged for loop here if you use `take_front`, e.g. > > `

[PATCH] D33788: Return a canonical path from getClangResourcePath()

2017-06-02 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In https://reviews.llvm.org/D33788#771504, @akyrtzi wrote: > Getting the real path is notoriously slow (at least it's horrible in OSX, not > sure about linux). Since this is about dropping the '/../' part, could we do > some simple canonicalization of removing the

[PATCH] D33102: [clang] Implement -Wcast-qual for C++

2017-06-02 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri updated this revision to Diff 101232. lebedev.ri marked an inline comment as done. lebedev.ri added a subscriber: cfe-commits. lebedev.ri added a comment. Address review notes. Repository: rL LLVM https://reviews.llvm.org/D33102 Files: docs/ReleaseNotes.rst lib/Sema/SemaCast.c

[PATCH] D33102: [clang] Implement -Wcast-qual for C++

2017-06-02 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. In https://reviews.llvm.org/D33102#767291, @dblaikie wrote: > Still seems like an awful lot more testing than I'd expect for this warning. > (eg: testing all the many variations of C++ const_cast - when they all > provide basically the same coverage I think, that al

[PATCH] D33497: [clang-tidy] check for __func__/__FUNCTION__ in lambdas

2017-06-02 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh accepted this revision. alexfh added a comment. This revision is now accepted and ready to land. Looks good! https://reviews.llvm.org/D33497 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinf

[PATCH] D33788: Return a canonical path from getClangResourcePath()

2017-06-02 Thread Argyrios Kyrtzidis via Phabricator via cfe-commits
akyrtzi added a comment. I retract my comment, I see that `getMainExecutable` on OSX calls realpath as well, so it's good to use realpath in this code to make sure they are in-sync with how the compiler will determine the path. https://reviews.llvm.org/D33788 ___

[PATCH] D33825: [clang-tidy] signal handler must be plain old function check

2017-06-02 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tidy/cert/CERTTidyModule.cpp:64 +"cert-msc54-cpp"); // C checkers // DCL checker -> check. Comment at: docs/ReleaseNotes.rst:73 + + Checks if a signal handler is not a p

r304568 - [Modules] Fix use after scope.

2017-06-02 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Fri Jun 2 12:30:24 2017 New Revision: 304568 URL: http://llvm.org/viewvc/llvm-project?rev=304568&view=rev Log: [Modules] Fix use after scope. Found by asan. Modified: cfe/trunk/lib/Serialization/ASTWriter.cpp Modified: cfe/trunk/lib/Serialization/ASTWriter.cpp URL: http:

Re: r304515 - Support lazy stat'ing of files referenced by module maps.

2017-06-02 Thread Benjamin Kramer via cfe-commits
I committed a workaround in r304568. On Fri, Jun 2, 2017 at 6:59 PM, Alexander Kornienko via cfe-commits wrote: > I've not yet figured out exactly, but I have a suspicion that this commit > causes crashes when run under asan. Specifically, when running > test/Modules/preprocess-module.cpp > > The

[PATCH] D33597: [OpenCL] Fix pipe size in TypeInfo.

2017-06-02 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia updated this revision to Diff 101236. Anastasia added a comment. Added RUN line for AMD https://reviews.llvm.org/D33597 Files: lib/AST/ASTContext.cpp test/Index/pipe-size.cl Index: test/Index/pipe-size.cl === --- /d

[PATCH] D33842: [AMDGPU] Fix address space of global variable

2017-06-02 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl created this revision. Herald added subscribers: t-tye, tpr, dstuttard, wdng, kzhuravl. amdgcn target requires global variable to stay in global or constant address space. In C or C++ global variables are emitted in the default (generic) address space which the amdgcn backend cannot handle

[clang-tools-extra] r304570 - [clang-tidy] check for __func__/__FUNCTION__ in lambdas

2017-06-02 Thread Alexander Kornienko via cfe-commits
Author: alexfh Date: Fri Jun 2 12:36:32 2017 New Revision: 304570 URL: http://llvm.org/viewvc/llvm-project?rev=304570&view=rev Log: [clang-tidy] check for __func__/__FUNCTION__ in lambdas Add a clang-tidy check for using func__/FUNCTION__ inside lambdas. This evaluates to the string operator(),

[PATCH] D33497: [clang-tidy] check for __func__/__FUNCTION__ in lambdas

2017-06-02 Thread Alexander Kornienko via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL304570: [clang-tidy] check for __func__/__FUNCTION__ in lambdas (authored by alexfh). Changed prior to commit: https://reviews.llvm.org/D33497?vs=101224&id=101237#toc Repository: rL LLVM https://rev

[PATCH] D33821: [OpenCL] Harden function pointer diagnostics.

2017-06-02 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia accepted this revision. Anastasia added a comment. This revision is now accepted and ready to land. LGTM! https://reviews.llvm.org/D33821 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinf

[PATCH] D33597: [OpenCL] Fix pipe size in TypeInfo.

2017-06-02 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl accepted this revision. yaxunl added a comment. This revision is now accepted and ready to land. LGTM. Thanks! https://reviews.llvm.org/D33597 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listi

r304575 - [OpenCL] Harden function pointer diagnostics.

2017-06-02 Thread Alexey Bader via cfe-commits
Author: bader Date: Fri Jun 2 13:08:58 2017 New Revision: 304575 URL: http://llvm.org/viewvc/llvm-project?rev=304575&view=rev Log: [OpenCL] Harden function pointer diagnostics. Summary: Improve OpenCL type checking by rejecting function pointer types. Reviewers: Anastasia, yaxunl Reviewed By:

[PATCH] D33821: [OpenCL] Harden function pointer diagnostics.

2017-06-02 Thread Alexey Bader via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL304575: [OpenCL] Harden function pointer diagnostics. (authored by bader). Changed prior to commit: https://reviews.llvm.org/D33821?vs=101181&id=101242#toc Repository: rL LLVM https://reviews.llvm.o

[PATCH] D33827: [clang-tidy] misc-static-assert shouldn't flag assert(!"msg")

2017-06-02 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. While not directly related to this Differential, i wonder if it would make sense to also not warn on calls to (especially non-member) functions marked with `__attribute__((const))`, maybe `__attribute__((pure))` too. At least i'm not sure what side-effects such calls

[PATCH] D33842: [AMDGPU] Fix address space of global variable

2017-06-02 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: lib/CodeGen/CGExpr.cpp:360 + CGF.getContext().getTargetAddressSpace(LangAS::opencl_constant); +} auto *GV = new llvm::GlobalVariable( This is not an appropriate place to stick target-specif

[PATCH] D33788: Return a canonical path from getClangResourcePath()

2017-06-02 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno added a comment. > I'm unaware of any other API that canonicalizes the path, which is what users > of this API are going to expect. You can also call `sys::path::remove_dots(Path, /*remove_dot_dot=*/true);` > There's already a test case that covers this: Index/pch-from-libclang.c -- it

[libcxx] r304580 - Revert "Mark two coroutine tests as unsupported under ubsan"

2017-06-02 Thread Vedant Kumar via cfe-commits
Author: vedantk Date: Fri Jun 2 13:30:16 2017 New Revision: 304580 URL: http://llvm.org/viewvc/llvm-project?rev=304580&view=rev Log: Revert "Mark two coroutine tests as unsupported under ubsan" This reverts commit r304462, thereby re-enabling two tests under ubsan. We expect these tests to pass

[PATCH] D33788: Return a canonical path from getClangResourcePath()

2017-06-02 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In https://reviews.llvm.org/D33788#771671, @bruno wrote: > > I'm unaware of any other API that canonicalizes the path, which is what > > users of this API are going to expect. > > You can also call `sys::path::remove_dots(Path, /*remove_dot_dot=*/true);` Yes, but

[clang-tools-extra] r304581 - Fix formatting in docs.

2017-06-02 Thread Alexander Kornienko via cfe-commits
Author: alexfh Date: Fri Jun 2 13:44:32 2017 New Revision: 304581 URL: http://llvm.org/viewvc/llvm-project?rev=304581&view=rev Log: Fix formatting in docs. Modified: clang-tools-extra/trunk/docs/ReleaseNotes.rst Modified: clang-tools-extra/trunk/docs/ReleaseNotes.rst URL: http://llvm.org/v

[clang-tools-extra] r304583 - [clang-tidy] Add `const` to operator() to fix a warning.

2017-06-02 Thread Alexander Kornienko via cfe-commits
Author: alexfh Date: Fri Jun 2 13:47:50 2017 New Revision: 304583 URL: http://llvm.org/viewvc/llvm-project?rev=304583&view=rev Log: [clang-tidy] Add `const` to operator() to fix a warning. Modified: clang-tools-extra/trunk/clang-tidy/misc/LambdaFunctionNameCheck.h Modified: clang-tools-extr

[PATCH] D33788: Return a canonical path from getClangResourcePath()

2017-06-02 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno accepted this revision. bruno added a comment. This revision is now accepted and ready to land. > Yes, but that does not canonicalize the path. For instance, it won't handle > doubled-up slashes or symlinks. Right. > Ultimately, the value returned from this API gets passed to POSIX func

Re: [PATCH] D33788: Return a canonical path from getClangResourcePath()

2017-06-02 Thread Richard Smith via cfe-commits
On 2 June 2017 at 11:39, Aaron Ballman via Phabricator via cfe-commits < cfe-commits@lists.llvm.org> wrote: > aaron.ballman added a comment. > > In https://reviews.llvm.org/D33788#771671, @bruno wrote: > > > > I'm unaware of any other API that canonicalizes the path, which is > what users of this

Re: [PATCH] D33788: Return a canonical path from getClangResourcePath()

2017-06-02 Thread Richard Smith via cfe-commits
On 2 June 2017 at 12:04, Richard Smith wrote: > On 2 June 2017 at 11:39, Aaron Ballman via Phabricator via cfe-commits < > cfe-commits@lists.llvm.org> wrote: > >> aaron.ballman added a comment. >> >> In https://reviews.llvm.org/D33788#771671, @bruno wrote: >> >> > > I'm unaware of any other API t

[PATCH] D30170: Function definition may have uninstantiated body

2017-06-02 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff updated this revision to Diff 101260. sepavloff added a comment. Do not call getCanonicalDecl for deleted functions https://reviews.llvm.org/D30170 Files: include/clang/AST/Decl.h lib/AST/Decl.cpp lib/Sema/SemaDecl.cpp test/SemaCXX/cxx0x-cursory-default-delete.cpp test/SemaC

Re: [PATCH] D33788: Return a canonical path from getClangResourcePath()

2017-06-02 Thread Aaron Ballman via cfe-commits
On Fri, Jun 2, 2017 at 3:04 PM, Richard Smith wrote: > On 2 June 2017 at 11:39, Aaron Ballman via Phabricator via cfe-commits > wrote: >> >> aaron.ballman added a comment. >> >> In https://reviews.llvm.org/D33788#771671, @bruno wrote: >> >> > > I'm unaware of any other API that canonicalizes the

Re: [PATCH] D33788: Return a canonical path from getClangResourcePath()

2017-06-02 Thread Aaron Ballman via cfe-commits
On Fri, Jun 2, 2017 at 3:22 PM, Richard Smith wrote: > On 2 June 2017 at 12:04, Richard Smith wrote: >> >> On 2 June 2017 at 11:39, Aaron Ballman via Phabricator via cfe-commits >> wrote: >>> >>> aaron.ballman added a comment. >>> >>> In https://reviews.llvm.org/D33788#771671, @bruno wrote: >>>

[PATCH] D33735: [DebugInfo] Add ThisOrSelf attribute for emission of FlagObjectPointer.

2017-06-02 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev updated this revision to Diff 101262. ABataev added a comment. Herald added a subscriber: jholewinski. Added different kinds of ImplicitParamDecl. https://reviews.llvm.org/D33735 Files: include/clang/AST/Decl.h lib/AST/ASTImporter.cpp lib/AST/Decl.cpp lib/AST/DeclObjC.cpp lib/

[PATCH] D33827: [clang-tidy] misc-static-assert shouldn't flag assert(!"msg")

2017-06-02 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh accepted this revision. alexfh added a comment. This revision is now accepted and ready to land. LG. Thank you! Repository: rL LLVM https://reviews.llvm.org/D33827 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.o

[libcxx] r304591 - Mark two coroutine tests as unsupported under ubsan, again

2017-06-02 Thread Vedant Kumar via cfe-commits
Author: vedantk Date: Fri Jun 2 15:06:49 2017 New Revision: 304591 URL: http://llvm.org/viewvc/llvm-project?rev=304591&view=rev Log: Mark two coroutine tests as unsupported under ubsan, again This reverts commit r304580, making bool_await_suspend.pass.cpp and generator.pass.cpp unsupported on ub

Re: [libcxx] r304591 - Mark two coroutine tests as unsupported under ubsan, again

2017-06-02 Thread Vedant Kumar via cfe-commits
Hi Gor, This is just a heads-up that I tried re-enabling ubsan for the two tests affected by PR33271, but saw some similar failures. The commit message below has more details about what was tested and what went wrong. best, vedant > On Jun 2, 2017, at 1:06 PM, Vedant Kumar via cfe-commits >

Re: [libcxx] r304591 - Mark two coroutine tests as unsupported under ubsan, again

2017-06-02 Thread Vedant Kumar via cfe-commits
Hm, sorry, the compiler on the bot could not have picked up r304518, so I jumped the gun here. I'll try again later and report back in PR33271. vedant > On Jun 2, 2017, at 1:09 PM, Vedant Kumar via cfe-commits > wrote: > > Hi Gor, > > This is just a heads-up that I tried re-enabling ubsan fo

[PATCH] git-clang-format: Add --cached option to format index

2017-06-02 Thread Kevin Locke via cfe-commits
Add --cached option to git-clang-format which behaves analogously to --cached for other git subcommands, by causing the operation to work against the index state rather than the working directory state. This can be particularly useful for hook scripts which need to check or change the formatting o

Re: [PATCH] D33788: Return a canonical path from getClangResourcePath()

2017-06-02 Thread Richard Smith via cfe-commits
On 2 June 2017 at 12:26, Aaron Ballman wrote: > On Fri, Jun 2, 2017 at 3:22 PM, Richard Smith > wrote: > > On 2 June 2017 at 12:04, Richard Smith wrote: > >> > >> On 2 June 2017 at 11:39, Aaron Ballman via Phabricator via cfe-commits > >> wrote: > >>> > >>> aaron.ballman added a comment. > >>>

[PATCH] D33732: Catch invalid bitwise operation on vector of floats

2017-06-02 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno added a comment. Hi, Comment at: test/Sema/types.c:92 + +typedef float __attribute__((ext_vector_type(4))) float4; +float4 test3(float4 x) { Can you also add a test for the `vector_type` variant? It might be more appropriate to put this at test/Sema/ext

r304592 - [ODRHash] Add support for TemplateArgument types.

2017-06-02 Thread Richard Trieu via cfe-commits
Author: rtrieu Date: Fri Jun 2 15:35:29 2017 New Revision: 304592 URL: http://llvm.org/viewvc/llvm-project?rev=304592&view=rev Log: [ODRHash] Add support for TemplateArgument types. Modified: cfe/trunk/lib/AST/ODRHash.cpp cfe/trunk/test/Modules/odr_hash.cpp Modified: cfe/trunk/lib/AST/O

[PATCH] D33304: [clang-tidy][Part1] Add a new module Android and three new checks.

2017-06-02 Thread Yan Wang via Phabricator via cfe-commits
yawanng updated this revision to Diff 101267. https://reviews.llvm.org/D33304 Files: clang-tidy/CMakeLists.txt clang-tidy/android/AndroidTidyModule.cpp clang-tidy/android/CMakeLists.txt clang-tidy/android/FileOpenFlagCheck.cpp clang-tidy/android/FileOpenFlagCheck.h clang-tidy/plugin/C

Re: r304376 - PR33232: implement support for MSVC's __is_trivially_destructible trait.

2017-06-02 Thread Eric Fiselier via cfe-commits
I've been using !__is_identifier to test for things like that. It seems to be the most consistent way. Is there some problem with this? /Eric On Thu, Jun 1, 2017 at 6:46 PM, Richard Smith wrote: > On 31 May 2017 at 17:41, Eric Fiselier wrote: > >> I'm assuming libc++ should move to this trait

Re: [libcxx] r304591 - Mark two coroutine tests as unsupported under ubsan, again

2017-06-02 Thread Gor Nishanov via cfe-commits
Cool. Thanks for checking. On Fri, Jun 2, 2017 at 1:12 PM, Vedant Kumar wrote: > Hm, sorry, the compiler on the bot could not have picked up r304518, so I > jumped the gun here. I'll try again later and report back in PR33271. > > vedant > > > On Jun 2, 2017, at 1:09 PM, Vedant Kumar via cfe-com

[PATCH] D30170: Function definition may have uninstantiated body

2017-06-02 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: include/clang/AST/Decl.h:1868-1871 bool isThisDeclarationADefinition() const { -return IsDeleted || Body || IsLateTemplateParsed; +return IsDeleted || IsDefaulted || Body || IsLateTemplateParsed || + hasDefiningAttr();

[PATCH] D33797: [coroutines] Fix rebuilding of dependent coroutine parameters

2017-06-02 Thread Gor Nishanov via Phabricator via cfe-commits
GorNishanov added inline comments. Comment at: test/CodeGenCoroutines/coro-params.cpp:103 + // CHECK: call i8* @llvm.coro.begin + // CHECK-NEXT: call void @_ZN1AC1EOS_(%struct.A* %x1, %struct.A* dereferenceable(512) %x) + // CHECK-NEXT: call void @_ZNSt12experimental16corout

[PATCH] D33304: [clang-tidy][Part1] Add a new module Android and three new checks.

2017-06-02 Thread Yan Wang via Phabricator via cfe-commits
yawanng updated this revision to Diff 101279. yawanng added a comment. Format changes. https://reviews.llvm.org/D33304 Files: clang-tidy/CMakeLists.txt clang-tidy/android/AndroidTidyModule.cpp clang-tidy/android/CMakeLists.txt clang-tidy/android/FileOpenFlagCheck.cpp clang-tidy/androi

[PATCH] D33797: [coroutines] Fix rebuilding of dependent coroutine parameters

2017-06-02 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added a comment. @GorNishanov I think we should be transforming the move parameters, instead of re-building them entirely. I'll put together a different set of changes. https://reviews.llvm.org/D33797 ___ cfe-commits mailing list cfe-commits

[PATCH] D33852: Enable __declspec(selectany) on linux)

2017-06-02 Thread Piotr Padlewski via Phabricator via cfe-commits
Prazek created this revision. This feature was disabled probably by mistake in https://reviews.llvm.org/rL300562 This fixes bug https://bugs.llvm.org/show_bug.cgi?id=33285 https://reviews.llvm.org/D33852 Files: include/clang/Basic/Attr.td test/Sema/attr-selectany.c test/SemaCXX/attr-sele

[PATCH] D33797: [coroutines] Fix rebuilding of dependent coroutine parameters

2017-06-02 Thread Gor Nishanov via Phabricator via cfe-commits
GorNishanov updated this revision to Diff 101282. GorNishanov added a comment. test updated to use %[[copy_x]] instead of %x1 https://reviews.llvm.org/D33797 Files: lib/Sema/CoroutineStmtBuilder.h lib/Sema/SemaCoroutine.cpp lib/Sema/TreeTransform.h test/CodeGenCoroutines/coro-params.cpp

Re: r304376 - PR33232: implement support for MSVC's __is_trivially_destructible trait.

2017-06-02 Thread Richard Smith via cfe-commits
I think it comes down to a question of whether we want to guarantee that these traits are treated as not being identifiers. In some sense, it's an implementation detail that we model them as keywords -- and as it happens, there are some circumstances in which we *don't* model them as keywords. For

[PATCH] D33852: Enable __declspec(selectany) on linux

2017-06-02 Thread Davide Italiano via Phabricator via cfe-commits
davide added a comment. I think lowering `__declspec(selectany)` to a `comdat` for GVs on ELF platform is actually reasonable. I don't know what happens on Mach-O (as far as I can tell they don't have a real notion of COMDAT, they use coalesced symbols, but I'm not an expert of the format so yo

[PATCH] D33852: Enable __declspec(selectany) on linux

2017-06-02 Thread Davide Italiano via Phabricator via cfe-commits
davide added a comment. If you take my example, and you pass `-target x86_64-pc-win32-macho`: On clang-3.8, `TinkyWinky` is lowered to a GV with `weak_odr` linkage: $ clang++ 1.cpp -o - -emit-llvm -S -fms-extensions -target x86_64-pc-win32-macho ; ModuleID = '1.cpp' target datalayout = "e

r304604 - Fix assertion failure if we can't deduce a template argument for a variable

2017-06-02 Thread Richard Smith via cfe-commits
Author: rsmith Date: Fri Jun 2 17:53:06 2017 New Revision: 304604 URL: http://llvm.org/viewvc/llvm-project?rev=304604&view=rev Log: Fix assertion failure if we can't deduce a template argument for a variable template partial specialization. In passing, fix the deduction-crash.cpp test to actuall

[PATCH] D33833: Fix PR 33189: Clang assertion on template destructor declaration

2017-06-02 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: lib/AST/DeclCXX.cpp:1420 DeclContext::lookup_result R = lookup(Name); - if (R.empty()) + if (R.empty() || !isa(R.front())) return nullptr; As it is, ``` return R.empty() ? nullptr : dyn_cast(R.fr

[PATCH] D33841: [clang-tidy] redundant keyword check

2017-06-02 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. Please mention this check in docs/ReleaseNotes.rst (in alphabetical order). Comment at: docs/clang-tidy/checks/readability-redundant-keyword.rst:6 + +This checker removes the redundant `extern` and `inline` keywords from code. +

[PATCH] D33841: [clang-tidy] redundant keyword check

2017-06-02 Thread Piotr Padlewski via Phabricator via cfe-commits
Prazek added a comment. Feature request: removing "void" from int main(void) Repository: rL LLVM https://reviews.llvm.org/D33841 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D33841: [clang-tidy] redundant keyword check

2017-06-02 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. In https://reviews.llvm.org/D33841#771944, @Prazek wrote: > Feature request: removing "void" from int main(void) This will duplicate modernize-redundant-void-arg. Repository: rL LLVM https://reviews.llvm.org/D33841

[PATCH] D33797: [coroutines] Fix rebuilding of dependent coroutine parameters

2017-06-02 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF updated this revision to Diff 101291. EricWF added a comment. - Diagnose non-moveable but otherwise unnamed parameters. - Have TreeTransform.h check if building the move params is successful. https://reviews.llvm.org/D33797 Files: lib/Sema/CoroutineStmtBuilder.h lib/Sema/SemaCoroutin

[PATCH] D33797: [coroutines] Fix rebuilding of dependent coroutine parameters

2017-06-02 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added inline comments. Comment at: lib/Sema/SemaCoroutine.cpp:1285 + // We needed to check it, but we don't need to generate code for it. + if (!paramDecl->getIdentifier()) +continue; @rsmith Is there a better way to check if the move wou

[PATCH] D33841: [clang-tidy] redundant keyword check

2017-06-02 Thread Piotr Padlewski via Phabricator via cfe-commits
Prazek added a comment. extern on function definition is also redundant, right? Also, what about: inline extern void foo(); (you check if it startswith extern) Repository: rL LLVM https://reviews.llvm.org/D33841 ___ cfe-commits mailing list cfe-

[PATCH] D33852: Enable __declspec(selectany) on linux

2017-06-02 Thread Piotr Padlewski via Phabricator via cfe-commits
Prazek added a comment. OK, I will try to make it work on linux and windows only https://reviews.llvm.org/D33852 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D33797: [coroutines] Fix rebuilding of dependent coroutine parameters

2017-06-02 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: lib/Sema/SemaCoroutine.cpp:1285 + // We needed to check it, but we don't need to generate code for it. + if (!paramDecl->getIdentifier()) +continue; EricWF wrote: > @rsmith Is there a better way to check

[PATCH] D33797: [coroutines] Fix rebuilding of dependent coroutine parameters

2017-06-02 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF updated this revision to Diff 101293. EricWF added a comment. - No longer unnamed parameters from the AST. https://reviews.llvm.org/D33797 Files: lib/Sema/CoroutineStmtBuilder.h lib/Sema/SemaCoroutine.cpp lib/Sema/TreeTransform.h test/CodeGenCoroutines/coro-params.cpp test/Sema

  1   2   >