Re: [cfe-dev] r347339 - [clang][Parse] Diagnose useless null statements / empty init-statements

2018-12-04 Thread Roman Lebedev via cfe-commits
On Wed, Dec 5, 2018 at 4:07 AM Artem Dergachev via cfe-commits wrote: > > > > On 12/4/18 5:04 PM, George Karpenkov via cfe-dev wrote: > > > >> On Dec 4, 2018, at 4:47 PM, Aaron Ballman wrote: > >> > >> On Tue, Dec 4, 2018 at 7:35 PM George Karpenkov > >> wrote: > >>> Hi Roman, Hi. > >>> I’m ag

[PATCH] D55289: [analyzer] MoveChecker Pt.5: Improve invalidation policies.

2018-12-04 Thread Aleksei Sidorin via Phabricator via cfe-commits
a_sidorin added a comment. Hi Artem, The change looks fine, just some nits. Comment at: lib/StaticAnalyzer/Checkers/MoveChecker.cpp:537 +const MemRegion *ThisRegion = nullptr; +if (const auto *IC = dyn_cast_or_null(Call)) + ThisRegion = IC->getCXXThisVal().getAsReg

[PATCH] D21508: Diagnose friend function template redefinitions

2018-12-04 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff updated this revision to Diff 176763. sepavloff added a comment. Updated patch The fix for https://bugs.llvm.org/show_bug.cgi?id=39742 put a test case, which is not a valid code. The error is detected with this patch, tests are updated accordingly. Repository: rC Clang CHANGES SINC

[PATCH] D55262: [OpenCL] Fix for TBAA information of pointer after addresspacecast

2018-12-04 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. LGTM. Although this also fixes bugs with unaligned pointers that you might consider adding tests for. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55262/

[PATCH] D54862: [OpenCL] Add generic AS to 'this' pointer

2018-12-04 Thread John McCall via Phabricator via cfe-commits
rjmccall added a subscriber: akyrtzi. rjmccall added a comment. I have a lot of comments about various things that need to be fixed, but I just want to take a moment to say that this is a tremendously impressive patch: given only some very high-level directions, you've done a great job figuring

[PATCH] D54872: [clangd] Add ability to not use -resource-dir at all

2018-12-04 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle added a comment. It doesn't seem like there is any difference in how -resource-dir and /imsvc are handled: they are all added as -internal-isystem In MSVCToolChain::AddClangSystemIncludeArgs (MSCV.cpp): if (!DriverArgs.hasArg(options::OPT_nobuiltininc)) { AddSystemIncludeWithSub

[PATCH] D51832: [clang-tidy/checks] Update objc-property-declaration check to allow arbitrary acronyms and initialisms 🔧

2018-12-04 Thread Stephane Moore via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL348331: [clang-tidy/checks] Update objc-property-declaration check to allow arbitrary… (authored by stephanemoore, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https

[PATCH] D55245: [clang-tidy] Add the abseil-duration-subtraction check

2018-12-04 Thread Hyrum Wright via Phabricator via cfe-commits
hwright updated this revision to Diff 176757. hwright marked an inline comment as done. hwright added a comment. Fix double space. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55245/new/ https://reviews.llvm.org/D55245 Files: clang-tidy/abseil/AbseilTidyModule.cpp clang-tidy/absei

[PATCH] D53738: [Fixed Point Arithmetic] Fixed Point Addition

2018-12-04 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: clang/lib/Sema/SemaExpr.cpp:1304 +RHSTy = ResultTy; + } + leonardchan wrote: > rjmccall wrote: > > leonardchan wrote: > > > rjmccall wrote: > > > > leonardchan wrote: > > > > > rjmccall wrote: > > > > > > ebevhan w

[PATCH] D51832: [clang-tidy/checks] Update objc-property-declaration check to allow arbitrary acronyms and initialisms 🔧

2018-12-04 Thread Stephane Moore via Phabricator via cfe-commits
stephanemoore updated this revision to Diff 176756. stephanemoore added a comment. Rebased changes and resolved merge conflicts. Moved release notes update next to other release notes regarding updates to existing checks. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D51832/new/ https:/

Re: r348325 - [Sema] Remove some conditions of a failing assert

2018-12-04 Thread Richard Smith via cfe-commits
On Tue, 4 Dec 2018 at 16:46, Erik Pilkington via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Author: epilk > Date: Tue Dec 4 16:43:11 2018 > New Revision: 348325 > > URL: http://llvm.org/viewvc/llvm-project?rev=348325&view=rev > Log: > [Sema] Remove some conditions of a failing assert > >

[PATCH] D55250: [clangd] Enhance macro hover to see full definition

2018-12-04 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle updated this revision to Diff 176754. malaperle added a comment. Clang-format Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55250/new/ https://reviews.llvm.org/D55250 Files: clangd/XRefs.cpp unittests/clangd/XRefsTests.cpp Index: un

[PATCH] D51832: [clang-tidy/checks] Update objc-property-declaration check to allow arbitrary acronyms and initialisms 🔧

2018-12-04 Thread Stephane Moore via Phabricator via cfe-commits
stephanemoore added a comment. Chatted with Ben offline and he's okay with proceeding. Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D51832/new/ https://reviews.llvm.org/D51832 ___ cfe-commits mailing li

[clang-tools-extra] r348328 - [clang-query] Continue if compilation command not found for some files

2018-12-04 Thread George Karpenkov via cfe-commits
Author: george.karpenkov Date: Tue Dec 4 18:02:40 2018 New Revision: 348328 URL: http://llvm.org/viewvc/llvm-project?rev=348328&view=rev Log: [clang-query] Continue if compilation command not found for some files When searching for a code pattern in an entire project with a compilation database

r348327 - [asan] Add clang flag -fsanitize-address-use-odr-indicator

2018-12-04 Thread Vitaly Buka via cfe-commits
Author: vitalybuka Date: Tue Dec 4 17:44:31 2018 New Revision: 348327 URL: http://llvm.org/viewvc/llvm-project?rev=348327&view=rev Log: [asan] Add clang flag -fsanitize-address-use-odr-indicator Reviewers: eugenis, m.ostapenko, ygribov Subscribers: hiraditya, llvm-commits Differential Revision

[PATCH] D54923: [Modules] Remove non-determinism while serializing DECL_CONTEXT_LEXICAL and DECL_RECORD

2018-12-04 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno added a comment. Ping! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D54923/new/ https://reviews.llvm.org/D54923 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D55307: [analyzer] MoveChecker Pt.6: Suppress the warning for the few move-safe STL classes.

2018-12-04 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ created this revision. NoQ added reviewers: dcoughlin, xazax.hun, a_sidorin, george.karpenkov, szepet, rnkovacs, Szelethus. Herald added subscribers: cfe-commits, dkrupp, donat.nagy, mikhail.ramalho, a.sidorin, baloghadamsoftware. List of such classes shamelessly copied from https://wiki.se

[PATCH] D55280: [CTU] Remove redundant error check

2018-12-04 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. From what I can see, this patch LGTM, but I lack the experience in the CTU department just yet to give any meaningful feedback. Comment at: lib/CrossTU/CrossTranslationUnit.cpp:147 llvm::Expected CrossTranslationUnitContext::getCrossTUDefinition(

Re: [cfe-dev] r347339 - [clang][Parse] Diagnose useless null statements / empty init-statements

2018-12-04 Thread Artem Dergachev via cfe-commits
On 12/4/18 5:04 PM, George Karpenkov via cfe-dev wrote: On Dec 4, 2018, at 4:47 PM, Aaron Ballman wrote: On Tue, Dec 4, 2018 at 7:35 PM George Karpenkov wrote: Hi Roman, I’m against this new warning. A very common idiom is defining a “DEBUG” macro to be a no-op in release, and a loggin

Re: r347339 - [clang][Parse] Diagnose useless null statements / empty init-statements

2018-12-04 Thread George Karpenkov via cfe-commits
> On Dec 4, 2018, at 4:47 PM, Aaron Ballman wrote: > > On Tue, Dec 4, 2018 at 7:35 PM George Karpenkov wrote: >> >> Hi Roman, >> >> I’m against this new warning. >> >> A very common idiom is defining a “DEBUG” macro to be a no-op in release, >> and a logging function otherwise. >> The new

[PATCH] D53280: [analyzer] Emit an error for invalid -analyzer-config inputs

2018-12-04 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus marked an inline comment as done. Szelethus added a comment. In D53280#1319503 , @NoQ wrote: > It's a flag that was removed but old soft doesn't know that it was removed, > and it won't be fixed because it's old. We could just add the flag bac

[PATCH] D55269: [CUDA][OpenMP] Fix nvidia-cuda-toolkit detection on Debian/Ubuntu

2018-12-04 Thread Joel E. Denny via Phabricator via cfe-commits
jdenny added a comment. In D55269#1319452 , @tra wrote: > In D55269#1319437 , @jdenny wrote: > > > > > > That may be a bigger can of works than a single patch can solve. The good > news is that the maintainer of CU

Re: r346041 - Diagnose parameter names that shadow the names of inherited fields under -Wshadow-field.

2018-12-04 Thread George Karpenkov via cfe-commits
> On Dec 4, 2018, at 4:48 PM, Aaron Ballman wrote: > > On Tue, Dec 4, 2018 at 7:17 PM George Karpenkov wrote: >> >> Hi Aaron, >> >> Should such changes be reviewed? > > This was reviewed in D52421. > >> In particular, it introduces tons of warnings in XNU (which are painful due >> to -Wer

[PATCH] D42682: [clang-tidy] Add io-functions-misused checker

2018-12-04 Thread Gábor Horváth via Phabricator via cfe-commits
hgabii updated this revision to Diff 176736. Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D42682/new/ https://reviews.llvm.org/D42682 Files: clang-tidy/bugprone/BugproneTidyModule.cpp clang-tidy/bugprone/CMakeLists.txt clang-tidy/bugprone/IoFun

[PATCH] D53280: [analyzer] Emit an error for invalid -analyzer-config inputs

2018-12-04 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. It's a flag that was removed but old soft doesn't know that it was removed, and it won't be fixed because it's old. I guess a typo would have caused the same problem. Not urgent, no pressure. Yes, i believe this patch is good and should stay there. At the same time, by the

Re: r346041 - Diagnose parameter names that shadow the names of inherited fields under -Wshadow-field.

2018-12-04 Thread Aaron Ballman via cfe-commits
On Tue, Dec 4, 2018 at 7:17 PM George Karpenkov wrote: > > Hi Aaron, > > Should such changes be reviewed? This was reviewed in D52421. > In particular, it introduces tons of warnings in XNU (which are painful due > to -Werror). > I expect similar issues in many other our projects. > > While in

Re: r347339 - [clang][Parse] Diagnose useless null statements / empty init-statements

2018-12-04 Thread Aaron Ballman via cfe-commits
On Tue, Dec 4, 2018 at 7:35 PM George Karpenkov wrote: > > Hi Roman, > > I’m against this new warning. > > A very common idiom is defining a “DEBUG” macro to be a no-op in release, and > a logging function otherwise. > The new introduced warning warns on all such cases (e.g. 'DEBUG(“mystring”);')

[PATCH] D53280: [analyzer] Emit an error for invalid -analyzer-config inputs

2018-12-04 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus marked an inline comment as done. Szelethus added inline comments. Comment at: lib/Driver/ToolChains/Clang.cpp:3307-3309 void Clang::ConstructJob(Compilation &C, const JobAction &JA, const InputInfo &Output, const InputInfoList &Inputs,

[PATCH] D42682: [clang-tidy] Add io-functions-misused checker

2018-12-04 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: docs/clang-tidy/checks/bugprone-io-functions.rst:4 +bugprone-io-functions += + Please adjust length. Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.

[PATCH] D55097: [constexpr][c++2a] Try-catch blocks in constexpr functions

2018-12-04 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno updated this revision to Diff 176733. bruno added a comment. Update patch after @erik.pilkington review! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55097/new/ https://reviews.llvm.org/D55097 Files: include/clang/Basic/DiagnosticSemaKinds.td lib/AST/ExprConstant.cpp lib/S

r348325 - [Sema] Remove some conditions of a failing assert

2018-12-04 Thread Erik Pilkington via cfe-commits
Author: epilk Date: Tue Dec 4 16:43:11 2018 New Revision: 348325 URL: http://llvm.org/viewvc/llvm-project?rev=348325&view=rev Log: [Sema] Remove some conditions of a failing assert We should have been checking that this state is consistent, but its possible for it to be filled later, so it isn't

[PATCH] D42682: [clang-tidy] Add io-functions-misused checker

2018-12-04 Thread Gábor Horváth via Phabricator via cfe-commits
hgabii marked an inline comment as done. hgabii added a comment. I moved to bugprone module and renamed to bugprone-io-functions. I added as a reference for cert-fio34-c. Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D42682/new/ https://reviews.llvm.

Re: r347339 - [clang][Parse] Diagnose useless null statements / empty init-statements

2018-12-04 Thread George Karpenkov via cfe-commits
Hi Roman, I’m against this new warning. A very common idiom is defining a “DEBUG” macro to be a no-op in release, and a logging function otherwise. The new introduced warning warns on all such cases (e.g. 'DEBUG(“mystring”);') As noted in the review, Clang warnings should generally not be used

[PATCH] D53280: [analyzer] Emit an error for invalid -analyzer-config inputs

2018-12-04 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. In D53280#1319446 , @NoQ wrote: > Ugh. We broke backwards compatibility when an invalid `-analyzer-config` is > specified but `-analyze` isn't specified. Yes, people are accidentally > relying on that :/ :/ :/ > > In this case

[PATCH] D42682: [clang-tidy] Add io-functions-misused checker

2018-12-04 Thread Gábor Horváth via Phabricator via cfe-commits
hgabii updated this revision to Diff 176732. hgabii marked an inline comment as done. hgabii edited the summary of this revision. Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D42682/new/ https://reviews.llvm.org/D42682 Files: clang-tidy/bugprone/Bu

[PATCH] D55269: [CUDA][OpenMP] Fix nvidia-cuda-toolkit detection on Debian/Ubuntu

2018-12-04 Thread Artem Belevich via Phabricator via cfe-commits
tra added a comment. In D55269#1319437 , @jdenny wrote: > In D55269#1319382 , @tra wrote: > > > Let's start with fixing OpenMP's cmake files. Once it no longer insists on > > specifying --cuda-path=/usr, and isUbun

Re: r346041 - Diagnose parameter names that shadow the names of inherited fields under -Wshadow-field.

2018-12-04 Thread George Karpenkov via cfe-commits
Hi Aaron, Should such changes be reviewed? In particular, it introduces tons of warnings in XNU (which are painful due to -Werror). I expect similar issues in many other our projects. While in principle correct, wouldn’t it make more sense to only warn on function definitions and not declaratio

[PATCH] D53280: [analyzer] Emit an error for invalid -analyzer-config inputs

2018-12-04 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. Ugh. We broke backwards compatibility when an invalid `-analyzer-config` is specified but `-analyze` isn't specified. Yes, people are accidentally relying on that :/ :/ :/ In this case the driver doesn't know that it needs to add `analyzer-config-compatibility-mode=true` (

[PATCH] D55269: [CUDA][OpenMP] Fix nvidia-cuda-toolkit detection on Debian/Ubuntu

2018-12-04 Thread Joel E. Denny via Phabricator via cfe-commits
jdenny added a comment. In D55269#1319382 , @tra wrote: > Let's start with fixing OpenMP's cmake files. Once it no longer insists on > specifying --cuda-path=/usr, and isUbuntu is in place, what is the remaining > failure that you see? I'm fairly certa

[PATCH] D54592: [analyzer][CStringChecker] evaluate explicit_bzero

2018-12-04 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. I hope you don't mind me changing the revision title -- many of us are automatically subscribed to revisions with `analyzer` in the title, that also helps with getting feedback sooner :) Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D54

[PATCH] D54592: [CStringChecker] evaluate explicit_bzero

2018-12-04 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. When you're doing something but it isn't working, i encourage you to investigate it more pro-actively, or at least add a FIXME so that people didn't think that this is the intended behavior. Comment at: lib/StaticAnalyzer/Checkers/CStringChecker.cpp:2232

[PATCH] D55101: [clang-tidy] Ignore namespaced and C++ member functions in google-objc-function-naming check 🙈

2018-12-04 Thread Stephane Moore via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL348317: [clang-tidy] Ignore namespaced and C++ member functions in google-objc-function… (authored by stephanemoore, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: htt

[PATCH] D55101: [clang-tidy] Ignore namespaced and C++ member functions in google-objc-function-naming check 🙈

2018-12-04 Thread Stephane Moore via Phabricator via cfe-commits
stephanemoore added a comment. Chatted offline with Ben and confirmed that he's okay with proceeding. Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55101/new/ https://reviews.llvm.org/D55101 ___ cfe-com

[PATCH] D54592: [CStringChecker] evaluate explicit_bzero

2018-12-04 Thread David CARLIER via Phabricator via cfe-commits
devnexen updated this revision to Diff 176722. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D54592/new/ https://reviews.llvm.org/D54592 Files: lib/StaticAnalyzer/Checkers/CStringChecker.cpp test/Analysis/string.c Index: test/Analysis/string.c

[PATCH] D55269: [CUDA][OpenMP] Fix nvidia-cuda-toolkit detection on Debian/Ubuntu

2018-12-04 Thread Artem Belevich via Phabricator via cfe-commits
tra added a comment. In D55269#1319319 , @jdenny wrote: > My real goal is to get clang and openmp working out of the box on Ubuntu. > Treating --cuda-path=/usr as a special case was just a way to get there. > It's odd apparently because nvidia-cuda-too

[PATCH] D53738: [Fixed Point Arithmetic] Fixed Point Addition

2018-12-04 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan marked an inline comment as done. leonardchan added inline comments. Comment at: clang/lib/Sema/SemaExpr.cpp:1304 +RHSTy = ResultTy; + } + rjmccall wrote: > leonardchan wrote: > > rjmccall wrote: > > > leonardchan wrote: > > > > rjmccall wrote: >

[PATCH] D55269: [CUDA][OpenMP] Fix nvidia-cuda-toolkit detection on Debian/Ubuntu

2018-12-04 Thread Joel E. Denny via Phabricator via cfe-commits
jdenny added a comment. In D55269#1319319 , @jdenny wrote: > > I do not think that changing clang to work around an issue in cmake files > > of one project is something we want to do. > > I don't have a separate project using cmake. The cmake files I'm r

[PATCH] D55269: [CUDA][OpenMP] Fix nvidia-cuda-toolkit detection on Debian/Ubuntu

2018-12-04 Thread Joel E. Denny via Phabricator via cfe-commits
jdenny added a comment. In D55269#1319252 , @tra wrote: > It appears that what you're trying to do is to add "/usr/lib/cuda" on Ubuntu > and Debian when --cuda-path=/usr is specified. > This is a rather odd thing to do. My real goal is to get clang and

[PATCH] D55066: [ASan] Minor documentation fix: clarify static linking limitation.

2018-12-04 Thread Max Moroz via Phabricator via cfe-commits
Dor1s added a comment. Thanks @eugenis for explaining the issue to me over chat. I've updated the CL and the description. I can abandon it though, if you find it useless. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55066/new/ https://reviews.llvm.org/D55066

[PATCH] D55270: [Sema] Further improvements to to static_assert diagnostics.

2018-12-04 Thread Arthur O'Dwyer via Phabricator via cfe-commits
Quuxplusone added inline comments. Comment at: lib/Sema/SemaTemplate.cpp:3062 +public: + FailedBooleanConditionPrinterHelper(const PrintingPolicy &Policy) + : Policy(Policy) {} `explicit` Comment at: lib/Sema/SemaTemplate.cpp:3065 + + ~F

[PATCH] D55066: [ASan] Minor documentation fix: remove static linking limitation.

2018-12-04 Thread Max Moroz via Phabricator via cfe-commits
Dor1s updated this revision to Diff 176712. Dor1s added a comment. Restore the message with a couple clarifying words. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55066/new/ https://reviews.llvm.org/D55066 Files: docs/AddressSanitizer.rst Index: docs/Addre

r348313 - Fix crash if an in-class explicit function specialization has explicit

2018-12-04 Thread Richard Smith via cfe-commits
Author: rsmith Date: Tue Dec 4 14:26:32 2018 New Revision: 348313 URL: http://llvm.org/viewvc/llvm-project?rev=348313&view=rev Log: Fix crash if an in-class explicit function specialization has explicit template arguments referring to template paramaeters. Added: cfe/trunk/test/SemaTemplate/

[PATCH] D55270: [Sema] Further improvements to to static_assert diagnostics.

2018-12-04 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: lib/Sema/SemaTemplate.cpp:3065 + + ~FailedBooleanConditionPrinterHelper() override {} + Is this definition necessary? Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55270/new/ htt

[PATCH] D55067: [HIP] Fix offset of kernel argument for AMDGPU target

2018-12-04 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. In D55067#1319047 , @arsenm wrote: > I don't understand how the alignment of the IR type isn't meaningful or > stable. The DataLayout gives us the concept of an ABI alignment, but you seem > to be saying this is meaningless (in

[PATCH] D51211: [Sema] Emit -Wformat properly for bitfield promotions.

2018-12-04 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. LGTM! Comment at: test/Sema/format-strings-bitfield-promotion.c:1 +// RUN: %clang_cc1 -triple x86_64-unknown-unknown -fsyntax-only -verify %s +

[PATCH] D55269: [CUDA][OpenMP] Fix nvidia-cuda-toolkit detection on Debian/Ubuntu

2018-12-04 Thread Artem Belevich via Phabricator via cfe-commits
tra added a comment. It appears that what you're trying to do is to add "/usr/lib/cuda" on Ubuntu and Debian when --cuda-path=/usr is specified. This is a rather odd thing to do. In the end only one of those paths will be in effect and that's the path that should be specified via --cuda-path. Th

[PATCH] D55189: Extract TextNodeDumper class

2018-12-04 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. LGTM! Comment at: lib/AST/ASTDumper.cpp:90 // Utilities -void dumpPointer(const void *Ptr); -void dumpSourceRange(SourceRange R); -void dumpLoc

[PATCH] D55188: Extract TextChildDumper class

2018-12-04 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. LGTM aside from a commenting nit. Comment at: include/clang/AST/ASTDumperUtils.h:112 +public: + /// Dump a child of the current node. + template void addChil

[PATCH] D54866: Cleanups in IdentifierInfo following the removal of PTH

2018-12-04 Thread Bruno Ricci via Phabricator via cfe-commits
riccibruno added a comment. Can this go in now that D54547 has been committed ? Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D54866/new/ https://reviews.llvm.org/D54866 ___ cfe-comm

[PATCH] D55257: Inline handling of DependentSizedArrayType

2018-12-04 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. In D55257#1319016 , @steveire wrote: > In D55257#1318769 , @aaron.ballman > wrote: > > > In D552

r348309 - Adding tests for -ast-dump; NFC.

2018-12-04 Thread Aaron Ballman via cfe-commits
Author: aaronballman Date: Tue Dec 4 13:50:08 2018 New Revision: 348309 URL: http://llvm.org/viewvc/llvm-project?rev=348309&view=rev Log: Adding tests for -ast-dump; NFC. This adds tests for the definition data of C++ record objects as well as special member functions. Added: cfe/trunk/tes

r348308 - Add tests for dumping base classes; NFC.

2018-12-04 Thread Aaron Ballman via cfe-commits
Author: aaronballman Date: Tue Dec 4 13:49:24 2018 New Revision: 348308 URL: http://llvm.org/viewvc/llvm-project?rev=348308&view=rev Log: Add tests for dumping base classes; NFC. Modified: cfe/trunk/test/AST/ast-dump-records.cpp Modified: cfe/trunk/test/AST/ast-dump-records.cpp URL: http:/

[PATCH] D55097: [constexpr][c++2a] Try-catch blocks in constexpr functions

2018-12-04 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington added a comment. Hi Bruno, thanks for working on this! Comment at: include/clang/Basic/DiagnosticSemaKinds.td:2370 + "use of this statement in a constexpr %select{function|constructor}0 " + "is incompatible with C++ standards before C++20">, + InGroup, Defaul

Re: [clang-tools-extra] r348302 - [Documentation] Make options section in Clang-tidy readability-uppercase-literal-suffix consistent with other checks.

2018-12-04 Thread Roman Lebedev via cfe-commits
On Wed, Dec 5, 2018 at 12:21 AM Eugene Zelenko via cfe-commits wrote: > > Author: eugenezelenko > Date: Tue Dec 4 13:19:08 2018 > New Revision: 348302 > > URL: http://llvm.org/viewvc/llvm-project?rev=348302&view=rev > Log: > [Documentation] Make options section in Clang-tidy > readability-upperc

[clang-tools-extra] r348302 - [Documentation] Make options section in Clang-tidy readability-uppercase-literal-suffix consistent with other checks.

2018-12-04 Thread Eugene Zelenko via cfe-commits
Author: eugenezelenko Date: Tue Dec 4 13:19:08 2018 New Revision: 348302 URL: http://llvm.org/viewvc/llvm-project?rev=348302&view=rev Log: [Documentation] Make options section in Clang-tidy readability-uppercase-literal-suffix consistent with other checks. Modified: clang-tools-extra/trunk

[PATCH] D55229: [COFF] Statically link certain runtime library functions

2018-12-04 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang marked an inline comment as done. mgrang added inline comments. Comment at: CodeGenObjC/gnu-init.m:103 +// Make sure we do not have dllimport on the load function +// CHECK-WIN: declare dso_local void @__objc_load I had to remove dllimport in this and th

[PATCH] D55229: [COFF] Statically link certain runtime library functions

2018-12-04 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang updated this revision to Diff 176693. mgrang retitled this revision from "[COFF, ARM64] Make -flto-visibility-public-std a driver and cc1 flag" to "[COFF] Statically link certain runtime library functions". mgrang edited the summary of this revision. CHANGES SINCE LAST ACTION https://re

[PATCH] D55269: [CUDA][OpenMP] Fix nvidia-cuda-toolkit detection on Debian/Ubuntu

2018-12-04 Thread Joel E. Denny via Phabricator via cfe-commits
jdenny added a comment. By the way, nvidia-cuda-toolkit does install the following, but there's no nvvm directory as clang currently expects: /usr/lib/nvidia-cuda-toolkit /usr/lib/nvidia-cuda-toolkit/bin /usr/lib/nvidia-cuda-toolkit/bin/cicc /usr/lib/nvidia-cuda-toolkit/bin/crt /usr/li

[PATCH] D55269: [CUDA][OpenMP] Fix nvidia-cuda-toolkit detection on Debian/Ubuntu

2018-12-04 Thread Joel E. Denny via Phabricator via cfe-commits
jdenny added a comment. @tra, @Hahnfeld: Thanks for your replies. In D55269#1318901 , @tra wrote: > I'm not sure that's something that needs to be fixed in clang. > > IIUIC, Debian has added a shim that pretends to be a monolithic CUDA install: > https:/

r348299 - [PowerPC] Make no-PIC default to match GCC - CLANG

2018-12-04 Thread Stefan Pintilie via cfe-commits
Author: stefanp Date: Tue Dec 4 12:15:37 2018 New Revision: 348299 URL: http://llvm.org/viewvc/llvm-project?rev=348299&view=rev Log: [PowerPC] Make no-PIC default to match GCC - CLANG Make -fno-PIC default on PowerPC LE. Differential Revision: https://reviews.llvm.org/D53384 Modified: cfe/

[PATCH] D55134: [CTU] Add triple/lang mismatch handling

2018-12-04 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. > We should probably prefer %clang_analyze_cc1 to %clang_cc1 -analyze here too. Ok, changed that. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55134/new/ https://reviews.llvm.org/D55134 ___

[PATCH] D55289: [analyzer] MoveChecker Pt.5: Improve invalidation policies.

2018-12-04 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added inline comments. Comment at: lib/StaticAnalyzer/Checkers/MoveChecker.cpp:545 + if (ThisRegion != Region) +if (std::find(Regions.begin(), Regions.end(), Region) != Regions.end()) + State = removeFromState(State, Region); This is clu

[PATCH] D55134: [CTU] Add triple/lang mismatch handling

2018-12-04 Thread Gabor Marton via Phabricator via cfe-commits
martong updated this revision to Diff 176687. martong added a comment. - Use clang_analyze_cc1 Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55134/new/ https://reviews.llvm.org/D55134 Files: include/clang/Basic/DiagnosticCrossTUKinds.td include/clang/Basic/D

[PATCH] D55289: [analyzer] MoveChecker Pt.5: Improve invalidation policies.

2018-12-04 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ created this revision. NoQ added reviewers: dcoughlin, xazax.hun, a_sidorin, george.karpenkov, szepet, rnkovacs, Szelethus. Herald added subscribers: cfe-commits, dkrupp, donat.nagy, mikhail.ramalho, a.sidorin, baloghadamsoftware. If a moved-from object is passed into a conservatively evalua

[PATCH] D55134: [CTU] Add triple/lang mismatch handling

2018-12-04 Thread Gabor Marton via Phabricator via cfe-commits
martong updated this revision to Diff 176686. martong marked an inline comment as done. martong added a comment. - Add a case to emitCrossTUDiagnostics Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55134/new/ https://reviews.llvm.org/D55134 Files: include/clan

[PATCH] D55134: [CTU] Add triple/lang mismatch handling

2018-12-04 Thread Gabor Marton via Phabricator via cfe-commits
martong marked 2 inline comments as done. martong added inline comments. Comment at: lib/CrossTU/CrossTranslationUnit.cpp:212 +// diagnostics. +Context.getDiagnostics().Report(diag::err_ctu_incompat_triple) +<< Unit->getMainFileName() << TripleTo.str() << TripleFr

[PATCH] D55067: [HIP] Fix offset of kernel argument for AMDGPU target

2018-12-04 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. In D55067#1318810 , @arsenm wrote: > An OpenCL kernel may call another OpenCL kernel. I am wondering how do you pass arguments to the kernel callee. A simpler solution would be not letting hipSetupArgument specify the offset. S

[PATCH] D55067: [HIP] Fix offset of kernel argument for AMDGPU target

2018-12-04 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm added a comment. In D55067#1318959 , @rjmccall wrote: > In D55067#1318810 , @arsenm wrote: > > > In D55067#1313419 , @rjmccall > > wrote: > > > > > I understand that

[PATCH] D55257: Inline handling of DependentSizedArrayType

2018-12-04 Thread Stephen Kelly via Phabricator via cfe-commits
steveire added a comment. In D55257#1318769 , @aaron.ballman wrote: > In D55257#1318376 , @steveire wrote: > > > In D55257#1318328 , @aaron.ballman > > wrote: > > > > > > I

[PATCH] D55085: Avoid emitting redundant or unusable directories in DIFile metadata entries

2018-12-04 Thread Adrian Prantl via Phabricator via cfe-commits
aprantl updated this revision to Diff 176677. aprantl added a reviewer: ilya-biryukov. aprantl added a comment. Ilya, this updated revision should restore the original GCOV behavior both for absolute and relative paths. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55085/new/ https://r

[PATCH] D54592: [CStringChecker] evaluate explicit_bzero

2018-12-04 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. P.S. I guess you can also include the regular `bzero()` here. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D54592/new/ https://reviews.llvm.org/D54592 ___ cfe-commits mailing list cfe-commits@lis

[PATCH] D54592: [CStringChecker] evaluate explicit_bzero

2018-12-04 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ edited reviewers, added: NoQ; removed: dergachev.a. NoQ added inline comments. Comment at: lib/StaticAnalyzer/Checkers/CStringChecker.cpp:2206-2207 + // See if the size argument is zero. + const LocationContext *LCtx = C.getLocationContext(); + SVal SizeVal = State->getSVa

[PATCH] D55226: [Fix][StaticAnalyzer] Bug 39792 - False positive on strcpy targeting struct member

2018-12-04 Thread Pierre van Houtryve via Phabricator via cfe-commits
Pierre-vh updated this revision to Diff 176676. Pierre-vh added a comment. Here's the diff without the extra newline :) CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55226/new/ https://reviews.llvm.org/D55226 Files: lib/StaticAnalyzer/Checkers/CheckSecuritySyntaxOnly.cpp test/Analy

[PATCH] D55127: [OpenCL] Diagnose conflicting address spaces between template definition and its instantiation

2018-12-04 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. LGTM with minor revisions. Comment at: lib/Sema/SemaType.cpp:7206 + // Do not deduce address spaces in templates. + T->isDependentType()) return; -

[PATCH] D53738: [Fixed Point Arithmetic] Fixed Point Addition

2018-12-04 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: clang/lib/Sema/SemaExpr.cpp:1304 +RHSTy = ResultTy; + } + leonardchan wrote: > rjmccall wrote: > > leonardchan wrote: > > > rjmccall wrote: > > > > ebevhan wrote: > > > > > rjmccall wrote: > > > > > > leonardchan w

[PATCH] D55226: [Fix][StaticAnalyzer] Bug 39792 - False positive on strcpy targeting struct member

2018-12-04 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. Thanks for the fix! :) In D55226#1318853 , @Pierre-vh wrote: > Hello again! I updated the diff and completely removed the outer if. Please > let me know what you think! If we're sure that `Target` isn't a `nullptr`, it's fin

[PATCH] D55067: [HIP] Fix offset of kernel argument for AMDGPU target

2018-12-04 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. In D55067#1318810 , @arsenm wrote: > In D55067#1313419 , @rjmccall wrote: > > > I understand that it's copied into a properly-aligned local variable, but > > if it affects how the function

[PATCH] D55134: [CTU] Add triple/lang mismatch handling

2018-12-04 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. We should probably prefer `%clang_analyze_cc1` to `%clang_cc1 -analyze` here too. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55134/new/ https://reviews.llvm.org/D55134 ___ cfe-commits m

[PATCH] D55134: [CTU] Add triple/lang mismatch handling

2018-12-04 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added inline comments. Comment at: lib/CrossTU/CrossTranslationUnit.cpp:212 +// diagnostics. +Context.getDiagnostics().Report(diag::err_ctu_incompat_triple) +<< Unit->getMainFileName() << TripleTo.str() << TripleFrom.str(); martong wrote

[PATCH] D49511: [Sema/Attribute] Check for noderef attribute

2018-12-04 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added a comment. *ping* @rsmith Any more comments on this patch or the one before it (https://reviews.llvm.org/D54014)? That one has the fix for pushing and popping another ExprEvalContext before acting on a function body in this patch. Repository: rC Clang CHANGES SINCE LAST AC

[PATCH] D55134: [CTU] Add triple/lang mismatch handling

2018-12-04 Thread Gabor Marton via Phabricator via cfe-commits
martong updated this revision to Diff 176672. martong added a comment. - Forgot to rename err_ctu_incompat_triple -> warn_ctu_incompat_triple Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55134/new/ https://reviews.llvm.org/D55134 Files: include/clang/Basic/Di

[PATCH] D55134: [CTU] Add triple/lang mismatch handling

2018-12-04 Thread Gabor Marton via Phabricator via cfe-commits
martong added inline comments. Comment at: include/clang/Basic/DiagnosticCrossTUKinds.td:19 + +def err_ctu_incompat_triple : Error< + "imported AST from '%0' had been generated for a different target, current: %1, imported: %2">; xazax.hun wrote: > I am not sur

[PATCH] D55134: [CTU] Add triple/lang mismatch handling

2018-12-04 Thread Gabor Marton via Phabricator via cfe-commits
martong updated this revision to Diff 176671. martong marked 4 inline comments as done. martong added a comment. - Diagnose a warning (which may be upgradable to an error) Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55134/new/ https://reviews.llvm.org/D55134 F

[PATCH] D55135: [CTU][Analyzer]Add DisplayCTUProgress analyzer switch

2018-12-04 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus accepted this revision. Szelethus added a comment. This revision is now accepted and ready to land. Thanks! LGTM! :) Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55135/new/ https://reviews.llvm.org/D55135

[PATCH] D55245: [clang-tidy] Add the abseil-duration-subtraction check

2018-12-04 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: docs/clang-tidy/checks/abseil-duration-subtraction.rst:7 +Checks for cases where subtraction should be performed in the +``absl::Duration`` domain. When subtracting two values, and the first one is +known to be a conversion from

[PATCH] D55269: [CUDA][OpenMP] Fix nvidia-cuda-toolkit detection on Debian/Ubuntu

2018-12-04 Thread Artem Belevich via Phabricator via cfe-commits
tra requested changes to this revision. tra added a comment. This revision now requires changes to proceed. I'm not sure that's something that needs to be fixed in clang. IIUIC, Debian has added a shim that pretends to be a monolithic CUDA install: https://bugs.launchpad.net/ubuntu/+source/clang/

[PATCH] D55226: [Fix][StaticAnalyzer] Bug 39792 - False positive on strcpy targeting struct member

2018-12-04 Thread Pierre van Houtryve via Phabricator via cfe-commits
Pierre-vh updated this revision to Diff 176661. Pierre-vh added a comment. Hello again! I updated the diff and completely removed the outer if. Please let me know what you think! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55226/new/ https://reviews.llvm.org/D55226 Files: lib/Sta

[PATCH] D53655: [ASTImporter] Fix redecl chain of classes and class templates

2018-12-04 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. @rsmith ping Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D53655/new/ https://reviews.llvm.org/D53655 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mai

[PATCH] D53738: [Fixed Point Arithmetic] Fixed Point Addition

2018-12-04 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan marked an inline comment as done. leonardchan added inline comments. Comment at: clang/lib/Sema/SemaExpr.cpp:1304 +RHSTy = ResultTy; + } + rjmccall wrote: > leonardchan wrote: > > rjmccall wrote: > > > ebevhan wrote: > > > > rjmccall wrote: > > >

[PATCH] D55129: [CTU] Eliminate race condition in CTU lit tests

2018-12-04 Thread Gabor Marton via Phabricator via cfe-commits
martong updated this revision to Diff 176660. martong added a comment. - Use rm, mkdir and break long RUN lines Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55129/new/ https://reviews.llvm.org/D55129 Files: test/Analysis/ctu-main.cpp Index: test/Analysis/ct

  1   2   3   >