[PATCH] D55275: [clangd] Dont provide locations for non-existent files.

2018-12-05 Thread Haojian Wu via Phabricator via cfe-commits
hokein added inline comments. Comment at: unittests/clangd/SymbolCollectorTests.cpp:1036 + runSymbolCollector(Header, /*Main=*/"", {"-Dfoo=bar"}); + EXPECT_THAT(Symbols, UnorderedElementsAre(QName("bar"))); +} We handled this case previously, but the code was r

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

2018-12-05 Thread Romanov Vlad via Phabricator via cfe-commits
romanovvlad added a comment. What bugs with unaligned pointers do you mean? Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55262/new/ https://reviews.llvm.org/D55262 ___ cfe-commits mailing list cfe-commits@lists.llvm

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

2018-12-05 Thread Haojian Wu via Phabricator via cfe-commits
hokein added inline comments. Comment at: clangd/XRefs.cpp:567 /// Generate a \p Hover object given the macro \p MacroInf. +static Hover getHoverContents(MacroDecl Decl, ASTContext &ASTCtx) { The comment seems stale. Comment at: clangd/XRefs

Re: r347720 - [RISCV] Mark unit tests as "requires: riscv-registered-target"

2018-12-05 Thread Alex Bradbury via cfe-commits
On Thu, 29 Nov 2018 at 09:44, Alex Bradbury wrote: > > On Tue, 27 Nov 2018 at 22:56, Mandeep Singh Grang via cfe-commits > wrote: > > > > Author: mgrang > > Date: Tue Nov 27 14:53:57 2018 > > New Revision: 347720 > > > > URL: http://llvm.org/viewvc/llvm-project?rev=347720&view=rev > > Log: > > [R

[clang-tools-extra] r348341 - Fix a false positive in misplaced-widening-cast

2018-12-05 Thread Jonas Toth via cfe-commits
Author: jonastoth Date: Wed Dec 5 00:29:56 2018 New Revision: 348341 URL: http://llvm.org/viewvc/llvm-project?rev=348341&view=rev Log: Fix a false positive in misplaced-widening-cast Summary: bugprone-misplaced-widening-cast check used to give a false warning to the following example. enum Day

[PATCH] D55255: Fix a false positive in misplaced-widening-cast

2018-12-05 Thread Jonas Toth via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL348341: Fix a false positive in misplaced-widening-cast (authored by JonasToth, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.llvm.org/D55255?vs=17660

[PATCH] D55255: Fix a false positive in misplaced-widening-cast

2018-12-05 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added a comment. Committed, Thank you for the patch! Was there a bug-report for this issue? If yes can you please close it/reference? Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55255/new/ https://reviews.llvm.org/D55255 ___

[PATCH] D55255: Fix a false positive in misplaced-widening-cast

2018-12-05 Thread Daniel Krupp via Phabricator via cfe-commits
dkrupp added a comment. In D55255#1319784 , @JonasToth wrote: > Committed, Thank you for the patch! Was there a bug-report for this issue? If > yes can you please close it/reference? There was not bug report for this. Thanks for committing! Repository

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

2018-12-05 Thread Clement Courbet via Phabricator via cfe-commits
courbet updated this revision to Diff 176771. courbet marked 2 inline comments as done. courbet added a comment. - Address comments - Add more tests - Remove AllowTopLevel and handle cases like `sizeof(T)` (-> `sizeof(int)`) Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llv

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

2018-12-05 Thread Clement Courbet via Phabricator via cfe-commits
courbet marked 7 inline comments as done. courbet added inline comments. Comment at: lib/Sema/SemaTemplate.cpp:3065 + + ~FailedBooleanConditionPrinterHelper() override {} + Quuxplusone wrote: > aaron.ballman wrote: > > Is this definition necessary? > Nit: I don'

[PATCH] D54757: [clang-tidy] new check: bugprone-branch-clone

2018-12-05 Thread Jonas Toth via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rCTE348343: [clang-tidy] new check: bugprone-branch-clone (authored by JonasToth, committed by ). Changed prior to commit: https://reviews.llvm.org/D54757?vs=176408&id=176772#toc Repository: rCTE Clang

[clang-tools-extra] r348343 - [clang-tidy] new check: bugprone-branch-clone

2018-12-05 Thread Jonas Toth via cfe-commits
Author: jonastoth Date: Wed Dec 5 01:16:25 2018 New Revision: 348343 URL: http://llvm.org/viewvc/llvm-project?rev=348343&view=rev Log: [clang-tidy] new check: bugprone-branch-clone Summary: Implement a check for detecting if/else if/else chains where two or more branches are Type I clones of eac

[PATCH] D55275: [clangd] Dont provide locations for non-existent files.

2018-12-05 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 176774. kadircet marked an inline comment as done. kadircet added a comment. - Revert rL346488 partially. Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55275/new/ https://rev

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

2018-12-05 Thread Clement Courbet via Phabricator via cfe-commits
courbet updated this revision to Diff 176773. courbet added a comment. - Update PHC and C11 tests. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55270/new/ https://reviews.llvm.org/D55270 Files: include/clang/Sema/Sema.h lib/Sema/SemaDeclCXX.cpp lib/Sema/S

[PATCH] D55275: [clangd] Dont provide locations for non-existent files.

2018-12-05 Thread Haojian Wu via Phabricator via cfe-commits
hokein accepted this revision. hokein added a comment. This revision is now accepted and ready to land. thanks! Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55275/new/ https://reviews.llvm.org/D55275 _

[PATCH] D55312: [clangd] Fix a typo in TUSchedulerTests

2018-12-05 Thread Haojian Wu via Phabricator via cfe-commits
hokein created this revision. hokein added a reviewer: ilya-biryukov. Herald added subscribers: kadircet, arphaman, jkorous, MaskRay, ioeric, javed.absar. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D55312 Files: unittests/clangd/TUSchedulerTests.cpp Index: unittests/clang

[clang-tools-extra] r348344 - Revert "[clang-tidy] new check: bugprone-branch-clone"

2018-12-05 Thread Jonas Toth via cfe-commits
Author: jonastoth Date: Wed Dec 5 01:34:18 2018 New Revision: 348344 URL: http://llvm.org/viewvc/llvm-project?rev=348344&view=rev Log: Revert "[clang-tidy] new check: bugprone-branch-clone" The patch broke on buildbot with assertion-failure. Revert until this is figured out. Removed: clang-

[PATCH] D54757: [clang-tidy] new check: bugprone-branch-clone

2018-12-05 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added a comment. I had to revert this patch because it broke (at least one) buildbot with an assertion-failure (http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-ubuntu-fast/builds/40436/steps/test/logs/stdio) Could you please take a look at it? I could not reproduce lo

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

2018-12-05 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added inline comments. Comment at: include/clang/CrossTU/CrossTranslationUnit.h:121 + /// \return Returns a pointer to the ASTUnit that contains the definition of + /// the looked up function. The pointer should not be a nullptr. /// Return value de

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

2018-12-05 Thread Gabor Marton via Phabricator via cfe-commits
martong updated this revision to Diff 176779. martong added a comment. - Return an error from loadExternalAST in case of nullptr Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55280/new/ https://reviews.llvm.org/D55280 Files: include/clang/CrossTU/CrossTranslat

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

2018-12-05 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun accepted this revision. xazax.hun added a comment. This revision is now accepted and ready to land. LG! Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55280/new/ https://reviews.llvm.org/D55280 ___ cfe-commi

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

2018-12-05 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. @Szelethus @balazske Thanks for your review! The meantime I have discussed with @xazax.hun that actually the called `ASTUnit::LoadFromASTFile` function inside `loadExternalAST` may return with a nullptr. So, the best is to handle that inside `loadExternalAST`. Reposit

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

2018-12-05 Thread David CARLIER via Phabricator via cfe-commits
devnexen marked an inline comment as done. devnexen added inline comments. Comment at: test/Analysis/string.c:1399 + bzero(str, 2); + clang_analyzer_eval(strlen(str) == 0); // expected-warning{{UNKNOWN}} +} NoQ wrote: > I suspect that the reason why this didn't

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

2018-12-05 Thread David CARLIER via Phabricator via cfe-commits
devnexen updated this revision to Diff 176780. devnexen added a comment. - Using same type for zero as memset. - Updating slighty the unit tests with ptr/dynamic array for bzero. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D54592/new/ https://reviews.llvm.org/D54592 Files: lib/Stati

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

2018-12-05 Thread David CARLIER via Phabricator via cfe-commits
devnexen added a comment. In D54592#1319421 , @Szelethus wrote: > 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

[PATCH] D55006: [clang] - Simplify tools::SplitDebugName

2018-12-05 Thread George Rimar via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL348352: [clang] - Simplify tools::SplitDebugName. (authored by grimar, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.llvm.org/D55006?vs=175843&id=1767

r348352 - [clang] - Simplify tools::SplitDebugName.

2018-12-05 Thread George Rimar via cfe-commits
Author: grimar Date: Wed Dec 5 03:09:10 2018 New Revision: 348352 URL: http://llvm.org/viewvc/llvm-project?rev=348352&view=rev Log: [clang] - Simplify tools::SplitDebugName. This is an updated version of the D54576, which was reverted. Problem was that SplitDebugName calls the InputInfo::getFil

r348356 - [test] Disable Modules/prune.m on NetBSD as it requires 'touch -a'

2018-12-05 Thread Michal Gorny via cfe-commits
Author: mgorny Date: Wed Dec 5 03:17:50 2018 New Revision: 348356 URL: http://llvm.org/viewvc/llvm-project?rev=348356&view=rev Log: [test] Disable Modules/prune.m on NetBSD as it requires 'touch -a' Modified: cfe/trunk/test/Modules/prune.m Modified: cfe/trunk/test/Modules/prune.m URL: http

[clang-tools-extra] r348357 - Fix compilation error when using clang 3.6.0

2018-12-05 Thread Mikael Holmen via cfe-commits
Author: uabelho Date: Wed Dec 5 03:29:27 2018 New Revision: 348357 URL: http://llvm.org/viewvc/llvm-project?rev=348357&view=rev Log: Fix compilation error when using clang 3.6.0 Modified: clang-tools-extra/trunk/unittests/clangd/BackgroundIndexTests.cpp Modified: clang-tools-extra/trunk/uni

[clang-tools-extra] r348359 - [clangd] Dont provide locations for non-existent files.

2018-12-05 Thread Kadir Cetinkaya via cfe-commits
Author: kadircet Date: Wed Dec 5 03:57:15 2018 New Revision: 348359 URL: http://llvm.org/viewvc/llvm-project?rev=348359&view=rev Log: [clangd] Dont provide locations for non-existent files. Summary: We were getting assertion errors when we had bad file names, instead we should skip those. Revie

[PATCH] D55275: [clangd] Dont provide locations for non-existent files.

2018-12-05 Thread Kadir Cetinkaya via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL348359: [clangd] Dont provide locations for non-existent files. (authored by kadircet, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM CHANGES SINCE LAST ACTION https://r

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

2018-12-05 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia updated this revision to Diff 176793. Anastasia added a comment. Added last corrections before committing. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55127/new/ https://reviews.llvm.org/D55127 Files: include/clang/Basic/DiagnosticSemaKinds.td lib/Sema/SemaType.cpp li

[PATCH] D55315: [clangd] Only reduce priority of a thread for indexing.

2018-12-05 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet created this revision. kadircet added a reviewer: ilya-biryukov. Herald added subscribers: cfe-commits, jfb, arphaman, jkorous, MaskRay, ioeric. We'll soon have tasks pending for reading shards from disk, we want them to have normal priority. Because: - They are not CPU intensive, mostly

[PATCH] D55312: [clangd] Fix a typo in TUSchedulerTests

2018-12-05 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov accepted this revision. ilya-biryukov added a comment. This revision is now accepted and ready to land. LGTM Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55312/new/ https://reviews.llvm.org/D55312 __

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

2018-12-05 Thread Aaron Ballman via cfe-commits
On Wed, Dec 5, 2018 at 1:40 AM Roman Lebedev wrote: > > 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

[PATCH] D54395: [clang-tidy] implement utility-function to add 'const' to variables

2018-12-05 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth marked 2 inline comments as done. JonasToth added inline comments. Comment at: clang-tidy/utils/FixItHintUtils.cpp:35 +static bool isValueType(QualType QT) { return isValueType(QT.getTypePtr()); } +static bool isArrayType(QualType QT) { return isa(QT.getTypePtr()); } +

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

2018-12-05 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. In D54872#1319684 , @malaperle wrote: > It doesn't seem like there is any difference in how -resource-dir and /imsvc > are handled: they are all added as -internal-isystem Thanks for digging this code up. I'm a bit confuse

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

2018-12-05 Thread Mikael Nilsson via Phabricator via cfe-commits
mikael marked an inline comment as done and an inline comment as not done. mikael added a comment. Thanks for the feedback, I'll work on fixing the issues! Comment at: lib/Sema/SemaOverload.cpp:1146 +unsigned OldQuals = OldMethod->getTypeQualifiers().getCVRUQualifiers(); +

r348364 - Revert: Honor -fdebug-prefix-map when creating function names for the debug info.

2018-12-05 Thread Renato Golin via cfe-commits
Author: rengolin Date: Wed Dec 5 05:56:26 2018 New Revision: 348364 URL: http://llvm.org/viewvc/llvm-project?rev=348364&view=rev Log: Revert: Honor -fdebug-prefix-map when creating function names for the debug info. This commit reverts r348060 and r348062 due to it breaking the AArch64 Full bui

[PATCH] D54901: [Haiku] Support __float128 for Haiku x86 and x86_64

2018-12-05 Thread Alexander von Gluck IV via Phabricator via cfe-commits
kallisti5 added a comment. Looks good to me. Could you commit for me? (no access) Thanks! Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D54901/new/ https://reviews.llvm.org/D54901 ___ cfe-commits mailing list cfe-com

[PATCH] D55315: [clangd] Only reduce priority of a thread for indexing.

2018-12-05 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Comment at: clangd/Threading.h:125 +// Sets scheduling priority for the calling thread. +void setThreadPriority(ThreadPriority Priority); // Avoid the use of scheduler policies that may starve low-priority threads. Maybe chan

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

2018-12-05 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: lib/AST/ItaniumMangle.cpp:1507 +Qualifiers MethodQuals = Qualifiers::fromCVRUMask( +Method->getTypeQualifiers().getCVRUQualifiers()); // We do not consider restrict a distinguishing attribute for overloading --

r348365 - Move detection of libc++ include dirs to Driver on MacOS

2018-12-05 Thread Ilya Biryukov via cfe-commits
Author: ibiryukov Date: Wed Dec 5 06:24:14 2018 New Revision: 348365 URL: http://llvm.org/viewvc/llvm-project?rev=348365&view=rev Log: Move detection of libc++ include dirs to Driver on MacOS Summary: The intention is to make the tools replaying compilations from 'compile_commands.json' (clang-

[clang-tools-extra] r348365 - Move detection of libc++ include dirs to Driver on MacOS

2018-12-05 Thread Ilya Biryukov via cfe-commits
Author: ibiryukov Date: Wed Dec 5 06:24:14 2018 New Revision: 348365 URL: http://llvm.org/viewvc/llvm-project?rev=348365&view=rev Log: Move detection of libc++ include dirs to Driver on MacOS Summary: The intention is to make the tools replaying compilations from 'compile_commands.json' (clang-

[PATCH] D54630: Move detection of libc++ include dirs to Driver on MacOS

2018-12-05 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC348365: Move detection of libc++ include dirs to Driver on MacOS (authored by ibiryukov, committed by ). Changed prior to commit: https://reviews.llvm.org/D54630?vs=174358&id=176805#toc Repository: r

[PATCH] D55321: Do not check for parameters shadowing fields in function declarations

2018-12-05 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman created this revision. aaron.ballman added reviewers: rsmith, george.karpenkov. Herald added subscribers: kristof.beyls, javed.absar. This patch changes the way we handle `-Wshadow-field` so that we do not issue diagnostics for parameters in function declarations (as those are harml

[PATCH] D55321: Do not check for parameters shadowing fields in function declarations

2018-12-05 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added inline comments. Comment at: test/SemaCXX/warn-shadow.cpp:236 } + void F(int B); // Ok, declaration; not definition. }; Can you please also add one function with out-of-line definition? CHANGES SINCE LAST ACTION https://reviews.llvm.org/

[PATCH] D55321: Do not check for parameters shadowing fields in function declarations

2018-12-05 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman updated this revision to Diff 176807. aaron.ballman added a comment. Added a test with an out-of-line definition. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55321/new/ https://reviews.llvm.org/D55321 Files: lib/Sema/SemaChecking.cpp lib/Sema/SemaDecl.cpp test/Sem

[PATCH] D55321: Do not check for parameters shadowing fields in function declarations

2018-12-05 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman marked 2 inline comments as done. aaron.ballman added inline comments. Comment at: test/SemaCXX/warn-shadow.cpp:236 } + void F(int B); // Ok, declaration; not definition. }; lebedev.ri wrote: > Can you please also add one function with out-of-l

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

2018-12-05 Thread Aaron Ballman via cfe-commits
On Tue, Dec 4, 2018 at 7:56 PM George Karpenkov wrote: > > > > > 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 pa

[PATCH] D55322: Mention changes to libc++ include dir lookup in release notes.

2018-12-05 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov created this revision. ilya-biryukov added a reviewer: arphaman. Herald added a reviewer: EricWF. The change itself landed as r348365, see the comment for more details. Repository: rC Clang https://reviews.llvm.org/D55322 Files: docs/ReleaseNotes.rst Index: docs/ReleaseNote

[PATCH] D54630: Move detection of libc++ include dirs to Driver on MacOS

2018-12-05 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. D55322 is a review for release notes Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D54630/new/ https://reviews.llvm.org/D54630 ___ cfe-commits mailing l

[PATCH] D54901: [Haiku] Support __float128 for Haiku x86 and x86_64

2018-12-05 Thread Kristina Brooks via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL348368: [Haiku] Support __float128 for x86 and x86_64 (authored by kristina, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.llvm.org/D54901?vs=175266&i

r348368 - [Haiku] Support __float128 for x86 and x86_64

2018-12-05 Thread Kristina Brooks via cfe-commits
Author: kristina Date: Wed Dec 5 07:05:06 2018 New Revision: 348368 URL: http://llvm.org/viewvc/llvm-project?rev=348368&view=rev Log: [Haiku] Support __float128 for x86 and x86_64 This patch addresses a compilation error with clang when running in Haiku being unable to compile code using float12

[PATCH] D55260: [CodeComplete] Fix a crash in access checks of inner classes

2018-12-05 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov updated this revision to Diff 176820. ilya-biryukov added a comment. - Make sure we still run ObjC access checks. - Add a test with a different NamingClass and BaseType. - Fix IsSimplyAccessible to work in this case. Repository: rC Clang CHANGES SINCE LAST ACTION https://revie

[PATCH] D55260: [CodeComplete] Fix a crash in access checks of inner classes

2018-12-05 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov updated this revision to Diff 176821. ilya-biryukov added a comment. - Reformat Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55260/new/ https://reviews.llvm.org/D55260 Files: lib/Sema/SemaAccess.cpp lib/Sema/SemaCodeComplete.cpp test/CodeCom

[PATCH] D55260: [CodeComplete] Fix a crash in access checks of inner classes

2018-12-05 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov marked an inline comment as done. ilya-biryukov added a comment. In D55260#1318280 , @kadircet wrote: > I believe also we need another test case where `Cls` and `NamingClass` are > different. Done. And thanks for finding this, I totally mi

[PATCH] D55260: [CodeComplete] Fix a crash in access checks of inner classes

2018-12-05 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov updated this revision to Diff 176823. ilya-biryukov added a comment. - Add a newline to the end of the test file Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55260/new/ https://reviews.llvm.org/D55260 Files: lib/Sema/SemaAccess.cpp lib/Sema/Se

[PATCH] D55326: [Driver] Fix incorrect GNU triplet for PowerPC on SUSE Linux

2018-12-05 Thread John Paul Adrian Glaubitz via Phabricator via cfe-commits
glaubitz created this revision. glaubitz added reviewers: jrtc27, kristina. Herald added subscribers: cfe-commits, jsji, nemanjai. On SUSE distributions for 32-bit PowerPC, gcc is configured as a 64-bit compiler using the GNU triplet "powerpc64-suse-linux", but invoked with "-m32" by default. Thus

[PATCH] D53866: [Preamble] Fix preamble for circular #includes

2018-12-05 Thread Nikolai Kosjar via Phabricator via cfe-commits
nik updated this revision to Diff 176826. nik added a comment. Addressed comments. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D53866/new/ https://reviews.llvm.org/D53866 Files: include/clang/Lex/Preprocessor.h include/clang/Serialization/ASTWriter.h lib/

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

2018-12-05 Thread Simon Marchi via Phabricator via cfe-commits
simark added inline comments. Comment at: clangd/XRefs.cpp:572 + + // Try to get the full definition, not just the name + SourceLocation StartLoc = Decl.Info->getDefinitionLoc(); hokein wrote: > if this is a complicated macro (like `AST_MATCHER`), do we still w

[PATCH] D53866: [Preamble] Fix preamble for circular #includes

2018-12-05 Thread Nikolai Kosjar via Phabricator via cfe-commits
nik marked 2 inline comments as done. nik added inline comments. Comment at: include/clang/Lex/Preprocessor.h:391 } PreambleConditionalStack; + bool PreambleGenerationFailed = false; ilya-biryukov wrote: > There's a mechanism to handle preamble with errors,

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

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

[PATCH] D55326: [Driver] Fix incorrect GNU triplet for PowerPC on SUSE Linux

2018-12-05 Thread James Clarke via Phabricator via cfe-commits
jrtc27 requested changes to this revision. jrtc27 added a comment. This revision now requires changes to proceed. Yes, this is a stupid situation to be in, but 32-bit PowerPC on SUSE really does use `/usr/lib/gcc/powerpc64-suse-linux`: root@redpanda:/var/tmp/build-root/openSUSE_Factory_PowerP

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

2018-12-05 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: lib/AST/ItaniumMangle.cpp:1507 +Qualifiers MethodQuals = Qualifiers::fromCVRUMask( +Method->getTypeQualifiers().getCVRUQualifiers()); // We do not consider restrict a distinguishing attribute for overloading ---

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

2018-12-05 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. The code was dropping all the original l-value information, which includes alignment. So if you start with an l-value that refers to under-aligned memory (or over-aligned), we were losing that information on the resulting l-value. The test case would be something lik

[PATCH] D55326: [Driver] Fix incorrect GNU triplet for PowerPC on SUSE Linux

2018-12-05 Thread John Paul Adrian Glaubitz via Phabricator via cfe-commits
glaubitz added a comment. Well, I agree on the comment to clarify why it has to be powerpc64-suse-linux, but I'm not sure whether anyone will ever start a SUSE derivative for 32-bit PowerPC, then fix the path in SUSE's gcc and then do a mass-rebuild. I think the probability is pretty low. Rep

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

2018-12-05 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: lib/Sema/SemaOverload.cpp:1146 +unsigned OldQuals = OldMethod->getTypeQualifiers().getCVRUQualifiers(); +unsigned NewQuals = NewMethod->getTypeQualifiers().getCVRUQualifiers(); if (!getLangOpts().CPlusPlus14 && NewMethod->

[PATCH] D55321: Do not check for parameters shadowing fields in function declarations

2018-12-05 Thread Stephen Kelly via Phabricator via cfe-commits
steveire added inline comments. Comment at: test/SemaCXX/warn-shadow.cpp:236 } + void F(int B); // Ok, declaration; not definition. }; aaron.ballman wrote: > lebedev.ri wrote: > > Can you please also add one function with out-of-line definition? > Gladly! Is

[PATCH] D55326: [Driver] Fix incorrect GNU triplet for PowerPC on SUSE Linux

2018-12-05 Thread John Paul Adrian Glaubitz via Phabricator via cfe-commits
glaubitz updated this revision to Diff 176830. glaubitz added a comment. Added a comment explaining the unusual triplet name. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55326/new/ https://reviews.llvm.org/D55326 Files: lib/Driver/ToolChains/Gnu.cpp Index:

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

2018-12-05 Thread Jonas Hahnfeld via Phabricator via cfe-commits
Hahnfeld added a comment. I think there are some misunderstandings here, or at least I understand things differently than @tra is describing them: AFAICS this change is NOT about replacing `nvcc` by `clang` in any CMake project (be that the OpenMP runtime or any other project outside of LLVM).

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

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

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

2018-12-05 Thread Mikael Nilsson via Phabricator via cfe-commits
mikael updated this revision to Diff 176831. mikael added a comment. I uploaded a new patch for most of the comments. I did leave some things out since they need clarification. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D54862/new/ https://reviews.llvm.org/D54862 Files: include/cl

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

2018-12-05 Thread Mikael Nilsson via Phabricator via cfe-commits
mikael marked an inline comment as done. mikael added inline comments. Comment at: lib/AST/ItaniumMangle.cpp:1507 +Qualifiers MethodQuals = Qualifiers::fromCVRUMask( +Method->getTypeQualifiers().getCVRUQualifiers()); // We do not consider restrict a distinguishin

[PATCH] D55321: Do not check for parameters shadowing fields in function declarations

2018-12-05 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman marked 2 inline comments as done. aaron.ballman added inline comments. Comment at: test/SemaCXX/warn-shadow.cpp:236 } + void F(int B); // Ok, declaration; not definition. }; steveire wrote: > aaron.ballman wrote: > > lebedev.ri wrote: > > > Can

[PATCH] D55315: [clangd] Only reduce priority of a thread for indexing.

2018-12-05 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 176834. kadircet marked 2 inline comments as done. kadircet added a comment. - Move priority change logic into enqueueTask Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55315/new/ https://reviews.llvm.org/D5531

[PATCH] D55260: [CodeComplete] Fix a crash in access checks of inner classes

2018-12-05 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet accepted this revision. kadircet added a comment. This revision is now accepted and ready to land. LGTM, thanks! Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55260/new/ https://reviews.llvm.org/D55260 ___ c

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

2018-12-05 Thread Argyrios Kyrtzidis via Phabricator via cfe-commits
akyrtzi added inline comments. Comment at: lib/Index/USRGeneration.cpp:274 +if (unsigned quals = MD->getTypeQualifiers().getCVRUQualifiers()) Out << (char)('0' + quals); switch (MD->getRefQualifier()) { rjmccall wrote: > Paging @akyrtzi here. The

r348379 - [NFC] Use clang-format on PrintingPolicy::PrintingPolicy() after fd5c386f743

2018-12-05 Thread Jan Korous via cfe-commits
Author: jkorous Date: Wed Dec 5 08:19:49 2018 New Revision: 348379 URL: http://llvm.org/viewvc/llvm-project?rev=348379&view=rev Log: [NFC] Use clang-format on PrintingPolicy::PrintingPolicy() after fd5c386f743 The white-space change was causing conflicts downstream. rdar://problem/46486841 Mod

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

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

[PATCH] D55331: [CodeComplete] Fix assertion failure

2018-12-05 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov created this revision. ilya-biryukov added a reviewer: kadircet. ...that fires when running completion inside an argument of UnresolvedMemberExpr (see the added test). The assertion that fires is from Sema::TryObjectArgumentInitialization: assert(FromClassification.isLValue());

[PATCH] D55280: [CTU] Make loadExternalAST return with non nullptr on success

2018-12-05 Thread Gabor Marton via Phabricator via cfe-commits
martong marked an inline comment as done. martong added inline comments. Comment at: lib/CrossTU/CrossTranslationUnit.cpp:147 llvm::Expected CrossTranslationUnitContext::getCrossTUDefinition(const FunctionDecl *FD, balazske wrote: > Szelethus wrote: > > Would

[PATCH] D55131: [CTU] Add more lit tests and better error handling

2018-12-05 Thread Gabor Marton via Phabricator via cfe-commits
martong marked an inline comment as done. martong added inline comments. Comment at: lib/CrossTU/CrossTranslationUnit.cpp:247 llvm::Expected CrossTranslationUnitContext::importDefinition(const FunctionDecl *FD) { ASTImporter &Importer = getOrCreateASTImporter(FD->getASTConte

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

2018-12-05 Thread Pierre van Houtryve via Phabricator via cfe-commits
Pierre-vh marked an inline comment as done. Pierre-vh added a comment. Hi again! As I'm quite new to this, I don't know what the next step is. Do we need to wait for more people to review this diff? What happens when it's considered "ready"? How is it committed? (I don't have commit access) Th

r348382 - [OpenCL] Diagnose conflicting address spaces in templates.

2018-12-05 Thread Anastasia Stulova via cfe-commits
Author: stulova Date: Wed Dec 5 09:02:22 2018 New Revision: 348382 URL: http://llvm.org/viewvc/llvm-project?rev=348382&view=rev Log: [OpenCL] Diagnose conflicting address spaces in templates. Added new diagnostic when templates are instantiated with different address space from the one provided

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

2018-12-05 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC348382: [OpenCL] Diagnose conflicting address spaces in templates. (authored by stulova, committed by ). Changed prior to commit: https://reviews.llvm.org/D55127?vs=176793&id=176841#toc Repository: r

r348384 - [Basic] Cleanups in IdentifierInfo following the removal of PTH

2018-12-05 Thread Bruno Ricci via cfe-commits
Author: brunoricci Date: Wed Dec 5 09:16:55 2018 New Revision: 348384 URL: http://llvm.org/viewvc/llvm-project?rev=348384&view=rev Log: [Basic] Cleanups in IdentifierInfo following the removal of PTH The Entry pointer in IdentifierInfo was only null for IdentifierInfo created from a PTH. Now tha

[PATCH] D55131: [CTU] Add more lit tests and better error handling

2018-12-05 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added inline comments. Comment at: test/Analysis/ctu-main.c:4 +// RUN: %clang_cc1 -triple x86_64-pc-linux-gnu -emit-pch -o %t/ctudir2/ctu-other.c.ast %S/Inputs/ctu-other.c +// RUN: cp %S/Inputs/externalFnMap2.txt %t/ctudir2/externalFnMap.txt +// RUN: %clang_cc1 -triple

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

2018-12-05 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC348384: [Basic] Cleanups in IdentifierInfo following the removal of PTH (authored by brunoricci, committed by ). Changed prior to commit: https://reviews.llvm.org/D54866?vs=175143&id=176843#toc Reposit

[PATCH] D55322: Mention changes to libc++ include dir lookup in release notes.

2018-12-05 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman accepted this revision. arphaman added a comment. This revision is now accepted and ready to land. LGTM. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55322/new/ https://reviews.llvm.org/D55322 ___ cfe-commi

[PATCH] D55260: [CodeComplete] Fix a crash in access checks of inner classes

2018-12-05 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC348387: [CodeComplete] Fix a crash in access checks of inner classes (authored by ibiryukov, committed by ). Changed prior to commit: https://reviews.llvm.org/D55260?vs=176823&id=176847#toc Repository:

r348387 - [CodeComplete] Fix a crash in access checks of inner classes

2018-12-05 Thread Ilya Biryukov via cfe-commits
Author: ibiryukov Date: Wed Dec 5 09:38:39 2018 New Revision: 348387 URL: http://llvm.org/viewvc/llvm-project?rev=348387&view=rev Log: [CodeComplete] Fix a crash in access checks of inner classes Summary: The crash was introduced in r348135. Reviewers: kadircet Reviewed By: kadircet Subscribe

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

2018-12-05 Thread Artem Belevich via Phabricator via cfe-commits
tra added a comment. In D55269#1320207 , @Hahnfeld wrote: > I think there are some misunderstandings here, or at least I understand > things differently than @tra is describing them: AFAICS this change is NOT > about replacing `nvcc` by `clang` in any CM

Re: [clang-tools-extra] r348176 - Fix compilation failure on Windows.

2018-12-05 Thread Ilya Biryukov via cfe-commits
Just noticed this. Really sorry that I submitted the broken version (made the rename at the last minute) and many thanks for fixing this! On Mon, Dec 3, 2018 at 9:01 PM Zachary Turner via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Author: zturner > Date: Mon Dec 3 11:59:00 2018 > New Rev

r348388 - Address a post-commit review comment on r348325.

2018-12-05 Thread Erik Pilkington via cfe-commits
Author: epilk Date: Wed Dec 5 09:43:26 2018 New Revision: 348388 URL: http://llvm.org/viewvc/llvm-project?rev=348388&view=rev Log: Address a post-commit review comment on r348325. Modified: cfe/trunk/test/SemaCXX/friend-template-redecl.cpp Modified: cfe/trunk/test/SemaCXX/friend-template-re

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

2018-12-05 Thread Erik Pilkington via cfe-commits
On 12/4/18 7:07 PM, Richard Smith wrote: On Tue, 4 Dec 2018 at 16:46, Erik Pilkington via cfe-commits mailto: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

[PATCH] D55321: Do not check for parameters shadowing fields in function declarations

2018-12-05 Thread George Karpenkov via Phabricator via cfe-commits
george.karpenkov accepted this revision. george.karpenkov added a comment. This revision is now accepted and ready to land. Thanks! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55321/new/ https://reviews.llvm.org/D55321 ___ cfe-commits mai

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

2018-12-05 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. Cool! Comment at: lib/StaticAnalyzer/Checkers/MoveChecker.cpp:528 ArrayRef ExplicitRegions, ArrayRef Regions, const LocationContext *LCtx, const CallEvent *Call) const { This isn't specific to this revision, but I find

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

2018-12-05 Thread George Karpenkov via cfe-commits
These are the cases I get: #define unexpected(a) { kprintf("unexpected %s:%d\n", __FILE__, __LINE__); a; } and #if 0 #define DEBG(fmt, args...) { IOLog(fmt, ## args); kprintf(fmt, ## args); } #else #define DEBG(fmt, args...) {} #endif Now calls `DEBG(‘x’);` and `unexpected(‘msg’);`

[PATCH] D55334: [AST] Pass the ASTContext to one of the ctor of DeclRefExpr

2018-12-05 Thread Bruno Ricci via Phabricator via cfe-commits
riccibruno created this revision. riccibruno added a reviewer: aaron.ballman. riccibruno added a project: clang. Herald added a subscriber: cfe-commits. Pass the `ASTContext` to one of the constructor of `DeclRefExpr` since in most cases the appropriate `ASTContext` is readily available. `Decl::g

  1   2   >