[PATCH] D52193: RFC: [clang] Multithreaded compilation support

2018-09-20 Thread Alexandre Ganea via Phabricator via cfe-commits
aganea added a comment. > clang-cl isn't supposed to do (explicit) registry accesses when you hold it > right (pass in -fms-compatibility-version etc). Have you seen registry access > costs, or is that speculation? Please see this log: F7268226: clang-cl-log.zip

[PATCH] D52248: [SEMA] ignore duplicate declaration specifiers from typeof exprs

2018-09-20 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers updated this revision to Diff 166351. nickdesaulniers added a comment. - warn only if -pedantic, add gcc bug test cases Repository: rC Clang https://reviews.llvm.org/D52248 Files: lib/Sema/SemaType.cpp test/Sema/gnu89.c Index: test/Sema/gnu89.c

[PATCH] D52021: Fix Bug 38926: don't merge short case labels if followed by a block

2018-09-20 Thread Owen Pan via Phabricator via cfe-commits
owenpan abandoned this revision. owenpan added a comment. Closed by r342708. Repository: rC Clang https://reviews.llvm.org/D52021 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

r342708 - [clang-format] Do not merge short case labels if followed by a block.

2018-09-20 Thread Owen Pan via cfe-commits
Author: owenpan Date: Thu Sep 20 20:46:36 2018 New Revision: 342708 URL: http://llvm.org/viewvc/llvm-project?rev=342708=rev Log: [clang-format] Do not merge short case labels if followed by a block. Do not allow short case labels on a single line if the label is followed by a left brace. Fixes

[PATCH] D52339: Support enums with a fixed underlying type in all language modes

2018-09-20 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington created this revision. erik.pilkington added reviewers: rsmith, rjmccall. Herald added a subscriber: dexonsmith. A significant number of internal C users have been complaining about the lack of support for fixed enums. We already support this in Objective-C mode, as well as in C

[PATCH] D52334: Build clang-tidy even without static analyzer

2018-09-20 Thread Stephen Kelly via Phabricator via cfe-commits
steveire created this revision. steveire added reviewers: JonasToth, george.karpenkov, shuaiwang, aaron.ballman. Herald added subscribers: cfe-commits, Szelethus, a.sidorin, mgorny. Conditionally compile the parts of clang-tidy which depend on the static analyzer. Repository: rCTE Clang Tools

[PATCH] D51187: [RFC] Thread safety analysis: Track status of scoped capability

2018-09-20 Thread Aaron Puchert via Phabricator via cfe-commits
aaronpuchert added a comment. Thanks for pointing out my error! Ignoring the implementation for a moment, do you think this is a good idea or will it produce to many false positives? Releasable/relockable scoped capabilities that I have seen keep track of the status, so it makes sense, but

[PATCH] D52281: [clang-tidy] Add modernize check to use std::invoke in generic code

2018-09-20 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tidy/modernize/ReplaceGenericFunctorCallCheck.cpp:27-32 + // template + // void f(T func) { + // func(); + // ^~~ + // ::std::invoke(func, 1) + Finder->addMatcher(callExpr(has(declRefExpr())).bind("functor"),

[PATCH] D52331: [Index] Report specialization bases as references when IndexImplicitInstantiation is true

2018-09-20 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay created this revision. MaskRay added reviewers: akyrtzi, arphaman. Herald added a subscriber: cfe-commits. template struct B {}; template struct D : B {}; // `B` was not reported as a reference This patch fixes this. Repository: rC Clang https://reviews.llvm.org/D52331

[PATCH] D52034: [Clang] Add options -Xclang -coverage-filter and -Xclang -coverage-exclude to filter the files to instrument with gcov

2018-09-20 Thread Vedant Kumar via Phabricator via cfe-commits
vsk added inline comments. Comment at: include/clang/Driver/CC1Options.td:236 +def coverage_exclude_EQ : Joined<["-"], "coverage-exclude=">, + Alias; def coverage_exit_block_before_body : Flag<["-"], "coverage-exit-block-before-body">, marco-c wrote: >

[PATCH] D52273: [clangd] Initial implementation of expected types

2018-09-20 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. This seems very clever, but extremely complicated - you've implemented much of C++'s conversion logic, it's not clear to me which parts are actually necessary to completion quality. (Honestly this applies to expected types overall - it seems intuitively likely that

[PATCH] D52034: [Clang] Add options -Xclang -coverage-filter and -Xclang -coverage-exclude to filter the files to instrument with gcov

2018-09-20 Thread Vedant Kumar via Phabricator via cfe-commits
vsk added inline comments. Comment at: test/CodeGen/code-coverage-filter.c:4 +// RUN: %clang_cc1 -emit-llvm -femit-coverage-data -coverage-exclude=.*\\.h %s -o - \ +// RUN:| FileCheck -check-prefix=NOH %s +// RUN: %clang_cc1 -emit-llvm -femit-coverage-data

Re: r342668 - Add testcases for r342667.

2018-09-20 Thread Jorge Gorbe Moya via cfe-commits
Filed https://bugs.llvm.org/show_bug.cgi?id=39029 for the incorrect behavior when including a path with a leading slash on Windows. On Thu, Sep 20, 2018 at 3:35 PM Eric Christopher wrote: > Thank you! > > On Thu, Sep 20, 2018, 3:34 PM Zachary Turner wrote: > >> Test removed in r342693. >> >>

Re: r342668 - Add testcases for r342667.

2018-09-20 Thread Eric Christopher via cfe-commits
Thank you! On Thu, Sep 20, 2018, 3:34 PM Zachary Turner wrote: > Test removed in r342693. > > On Thu, Sep 20, 2018 at 3:30 PM Jorge Gorbe Moya > wrote: > >> Zach and I were able to find the cause. >> >> Clang on Windows manages to find "file.h" when you #include "/file.h" and >> that makes the

Re: r342668 - Add testcases for r342667.

2018-09-20 Thread Zachary Turner via cfe-commits
Test removed in r342693. On Thu, Sep 20, 2018 at 3:30 PM Jorge Gorbe Moya wrote: > Zach and I were able to find the cause. > > Clang on Windows manages to find "file.h" when you #include "/file.h" and > that makes the expected diagnostic not appear. MSVC inteprets an #include > with a leading

r342693 - Remove failing test.

2018-09-20 Thread Zachary Turner via cfe-commits
Author: zturner Date: Thu Sep 20 15:32:51 2018 New Revision: 342693 URL: http://llvm.org/viewvc/llvm-project?rev=342693=rev Log: Remove failing test. Removing on behalf of Jorge Moya. This test is broken on Windows due to it actually being able to resolve the path. There is an actual

Re: r342668 - Add testcases for r342667.

2018-09-20 Thread Jorge Gorbe Moya via cfe-commits
Zach and I were able to find the cause. Clang on Windows manages to find "file.h" when you #include "/file.h" and that makes the expected diagnostic not appear. MSVC inteprets an #include with a leading slash as an absolute path so I think we have accidentally hit a different bug in Clang :) One

[PATCH] D52248: [SEMA] ignore duplicate declaration specifiers from typeof exprs

2018-09-20 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added inline comments. Comment at: test/Sema/gnu89.c:1-2 -// RUN: %clang_cc1 %s -std=gnu89 -pedantic -fsyntax-only -verify +// RUN: %clang_cc1 %s -std=gnu89 -pedantic -fsyntax-only 2>&1 | FileCheck -check-prefix=CHECK-PEDANTIC %s +// RUN: %clang_cc1 %s

[PATCH] D52248: [SEMA] ignore duplicate declaration specifiers from typeof exprs

2018-09-20 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added inline comments. Comment at: test/Sema/gnu89.c:1-2 -// RUN: %clang_cc1 %s -std=gnu89 -pedantic -fsyntax-only -verify +// RUN: %clang_cc1 %s -std=gnu89 -pedantic -fsyntax-only 2>&1 | FileCheck -check-prefix=CHECK-PEDANTIC %s +// RUN: %clang_cc1 %s

Re: r342668 - Add testcases for r342667.

2018-09-20 Thread Eric Christopher via cfe-commits
FWIW we're trying to reproduce here real fast and then will revert or fix real fast. Thanks! -eric On Thu, Sep 20, 2018 at 2:46 PM Eric Christopher wrote: > Adding Jorge... > > On Thu, Sep 20, 2018 at 2:36 PM wrote: > >> Hi Eric, >> >> The test that you added in this commit is failing on the

Re: r342668 - Add testcases for r342667.

2018-09-20 Thread Eric Christopher via cfe-commits
Adding Jorge... On Thu, Sep 20, 2018 at 2:36 PM wrote: > Hi Eric, > > The test that you added in this commit is failing on the PS4 Windows bot. > Can you please take a look? > > > http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-windows10pro-fast/builds/20052 > > FAIL: Clang ::

RE: r342668 - Add testcases for r342667.

2018-09-20 Thread via cfe-commits
Hi Eric, The test that you added in this commit is failing on the PS4 Windows bot. Can you please take a look? http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-windows10pro-fast/builds/20052 FAIL: Clang :: Preprocessor/include-leading-nonalpha-suggest.c (10765 of 43992)

[PATCH] D52323: Add necessary support for storing code-model to module IR.

2018-09-20 Thread Caroline Tice via Phabricator via cfe-commits
cmtice created this revision. cmtice added reviewers: tejohnson, pcc. Herald added subscribers: cfe-commits, dexonsmith, mehdi_amini. Currently the code-model does not get saved in the module IR, so if a code model is specified when compiling with LTO, it gets lost and is not propagated

[PATCH] D52136: [clang-tidy] Add modernize-concat-nested-namespaces check

2018-09-20 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tidy/modernize/ConcatNestedNamespacesCheck.cpp:52 +const NamespaceContextVec ) { + std::ostringstream Result; + bool First = true; Can this be rewritten with `llvm::for_each()` and a `Twine` so that we

[PATCH] D52193: RFC: [clang] Multithreaded compilation support

2018-09-20 Thread Alexandre Ganea via Phabricator via cfe-commits
aganea added a comment. In https://reviews.llvm.org/D52193#1241056, @zturner wrote: > The process stuff looks cool and useful independently of `/MP`. Would it be > possible to break that into a separate patch, and add a unit test for the > behavior of the `WaitAll` flag? Of course, will do.

[PATCH] D51866: [analyzer][UninitializedObjectChecker][WIP] New flag to ignore guarded uninitialized fields

2018-09-20 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. You can retrieve any node from the `ASTMatcher` by `.bind()`ing sub-matchers to string keys and later retrieving them from the `MatchResult` dictionary by those keys. It's like a regex capturing groups (and, well, `ASTMatchers` also support backreferences to such groups,

[PATCH] D52248: [SEMA] ignore duplicate declaration specifiers from typeof exprs

2018-09-20 Thread Stephen Hines via Phabricator via cfe-commits
srhines added inline comments. Comment at: lib/Sema/SemaType.cpp:1682 // or via one or more typedefs." -if (!S.getLangOpts().C99 && !S.getLangOpts().CPlusPlus -&& TypeQuals & Result.getCVRQualifiers()) { This is broken for C11 and C17 (even

[PATCH] D50214: Add inherited attributes before parsed attributes.

2018-09-20 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! Repository: rC Clang https://reviews.llvm.org/D50214 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D52193: RFC: [clang] Multithreaded compilation support

2018-09-20 Thread Zachary Turner via Phabricator via cfe-commits
zturner added a comment. The process stuff looks cool and useful independently of `/MP`. Would it be possible to break that into a separate patch, and add a unit test for the behavior of the `WaitAll` flag? Repository: rC Clang https://reviews.llvm.org/D52193

[PATCH] D52248: [SEMA] ignore duplicate declaration specifiers from typeof exprs

2018-09-20 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers updated this revision to Diff 166357. nickdesaulniers added a comment. - add line numbers to match specific warning lines Repository: rC Clang https://reviews.llvm.org/D52248 Files: lib/Sema/SemaType.cpp test/Sema/gnu89-const.c Index: test/Sema/gnu89-const.c

[PATCH] D50539: [VFS] Add property 'fallthrough' that controls fallback to real file system.

2018-09-20 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno added a comment. Hi Volodymyr, Thanks for working on this, really nice work with the tests! Comments below. > - No support for 'fallthrough' in crash reproducer. That'd be nice to have at some point to make sure we never escape into the real fs. > - Current way of working with modules

[PATCH] D52268: [AST] Squeeze some bits in LinkageComputer

2018-09-20 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. `LinkageComputer` isn't actually persisted anywhere, right? And there's maybe one computer active at once? So this compression is theoretically saving one pointer of stack space but forcing a bunch of bit-manipulation every time these fields are accessed.

[PATCH] D52248: [SEMA] ignore duplicate declaration specifiers from typeof exprs

2018-09-20 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers updated this revision to Diff 166355. nickdesaulniers added a comment. - move test to new file, use check-prefix for both cases Repository: rC Clang https://reviews.llvm.org/D52248 Files: lib/Sema/SemaType.cpp test/Sema/gnu89-const.c Index: test/Sema/gnu89-const.c

[PATCH] D52193: RFC: [clang] Multithreaded compilation support

2018-09-20 Thread Alexandre Ganea via Phabricator via cfe-commits
aganea marked an inline comment as done. aganea added a comment. It seems Reid's change has done good: `cmake` is not as significant as before in the build process. See below the improved timings: The tests consist in a full cleanup (delete build folder), cmake to regenerate, then a full

[PATCH] D52248: [SEMA] ignore duplicate declaration specifiers from typeof exprs

2018-09-20 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added inline comments. Comment at: test/Sema/gnu89.c:1-2 -// RUN: %clang_cc1 %s -std=gnu89 -pedantic -fsyntax-only -verify +// RUN: %clang_cc1 %s -std=gnu89 -pedantic -fsyntax-only 2>&1 | FileCheck -check-prefix=CHECK-PEDANTIC %s +// RUN: %clang_cc1 %s -std=gnu89

[PATCH] D52248: [SEMA] ignore duplicate declaration specifiers from typeof exprs

2018-09-20 Thread Manoj Gupta via Phabricator via cfe-commits
manojgupta added a comment. lgtm. But someone more familiar with these code paths should approve. Repository: rC Clang https://reviews.llvm.org/D52248 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D52248: [SEMA] ignore duplicate declaration specifiers from typeof exprs

2018-09-20 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers updated this revision to Diff 166352. nickdesaulniers added a comment. - git-clang-format HEAD~ Repository: rC Clang https://reviews.llvm.org/D52248 Files: lib/Sema/SemaType.cpp test/Sema/gnu89.c Index: test/Sema/gnu89.c

[PATCH] D52320: AMDGPU: add __builtin_amdgcn_update_dpp

2018-09-20 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl created this revision. yaxunl added reviewers: kzhuravl, b-sumner, arsenm. Herald added subscribers: t-tye, tpr, dstuttard, nhaehnle, wdng, jvesely. https://reviews.llvm.org/D52320 Files: include/clang/Basic/BuiltinsAMDGPU.def lib/CodeGen/CGBuiltin.cpp

[PATCH] D52313: [clang-doc] Avoid parsing undefined base classes

2018-09-20 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri accepted this revision. lebedev.ri added a comment. This revision is now accepted and ready to land. If it **no longer** crashes, i guess you can test for that? Other than that, SG. https://reviews.llvm.org/D52313 ___ cfe-commits

[PATCH] D52253: Fix an assert in the implementation of -Wquoted-include-in-framework-header

2018-09-20 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL342679: Fix an assert in -Wquoted-include-in-framework-header (authored by epilk, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit:

r342679 - Fix an assert in -Wquoted-include-in-framework-header

2018-09-20 Thread Erik Pilkington via cfe-commits
Author: epilk Date: Thu Sep 20 12:00:03 2018 New Revision: 342679 URL: http://llvm.org/viewvc/llvm-project?rev=342679=rev Log: Fix an assert in -Wquoted-include-in-framework-header Fixes rdar://43692300 Differential revision: https://reviews.llvm.org/D52253 Added:

[PATCH] D50539: [VFS] Add property 'fallthrough' that controls fallback to real file system.

2018-09-20 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai added a comment. Ping. https://reviews.llvm.org/D50539 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D52267: [AST] Various optimizations + refactoring in DeclarationName(Table)

2018-09-20 Thread John McCall via Phabricator via cfe-commits
rjmccall accepted this revision. rjmccall added inline comments. This revision is now accepted and ready to land. Comment at: include/clang/AST/DeclarationName.h:46 -/// DeclarationName - The name of a declaration. In the common case, -/// this just stores an IdentifierInfo

[PATCH] D52253: Fix an assert in the implementation of -Wquoted-include-in-framework-header

2018-09-20 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. LGTM with one more small change. Comment at: clang/test/Modules/double-quotes.m:35 +// rdar://43692300 +#import "NotAFramework/Headers/Headers/Thing1.h"

[PATCH] D52296: [Clang] - Add -gsingle-file-split-dwarf option.

2018-09-20 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added a comment. Do you/what's your particular use case for this scenario? I guess this looks a bit like Apple's format (where debug info stays in the object file and isn't linked into the final binary), but don't expect they'd be moving to this any time soon.

[PATCH] D52271: [Sema] Ensure that we retain __restrict qualifiers when substituting a reference type.

2018-09-20 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC342672: [Sema] Retain __restrict qualifiers when substituting a reference type. (authored by epilk, committed by ). Changed prior to commit: https://reviews.llvm.org/D52271?vs=166224=166334#toc

r342672 - [Sema] Retain __restrict qualifiers when substituting a reference type.

2018-09-20 Thread Erik Pilkington via cfe-commits
Author: epilk Date: Thu Sep 20 11:12:24 2018 New Revision: 342672 URL: http://llvm.org/viewvc/llvm-project?rev=342672=rev Log: [Sema] Retain __restrict qualifiers when substituting a reference type. Fixes rdar://43760099 Differential revision: https://reviews.llvm.org/D52271 Added:

[PATCH] D52266: [clang-cl] Provide separate flags for all the /O variants

2018-09-20 Thread Nico Weber via Phabricator via cfe-commits
thakis added inline comments. Comment at: include/clang/Driver/CLCompatOptions.td:121 +def : CLFlag<"Ob0">, Alias<_SLASH_O>, AliasArgs<["b0"]>, HelpText<"Disable function inlining">; +def : CLFlag<"Ob1">, Alias<_SLASH_O>, AliasArgs<["b1"]>, HelpText<"Only inline functions

[PATCH] D52315: [clang-tidy] Fix for performance-unnecessary-value-param, performance-unnecessary-copy-initialization and performance-for-range-copy

2018-09-20 Thread Felix Berger via Phabricator via cfe-commits
flx added inline comments. Comment at: clang-tidy/utils/TypeTraits.cpp:49 + if (Context.getTypeSize(Type) <= Context.getTypeSize(Context.VoidPtrTy)) +return false; + This early return now ignores the fact that the type has non-trivial copy constructors,

[PATCH] D52267: [AST] Various optimizations + refactoring in DeclarationName(Table)

2018-09-20 Thread Bruno Ricci via Phabricator via cfe-commits
riccibruno added a comment. Addressed some inline comments. Comment at: include/clang/AST/DeclarationName.h:46 -/// DeclarationName - The name of a declaration. In the common case, -/// this just stores an IdentifierInfo pointer to a normal -/// name. However, it also

[PATCH] D52267: [AST] Various optimizations + refactoring in DeclarationName(Table)

2018-09-20 Thread Bruno Ricci via Phabricator via cfe-commits
riccibruno updated this revision to Diff 166324. riccibruno marked 9 inline comments as done. riccibruno added a comment. Address rjmccall comments: 1. Renamed `CXXSpecialName` to `CXXSpecialNameExtra` 2. Introduced a constant `IdentifierInfoAlignment` for `alignas(IdentifierInfoAlignment)` 3.

[PATCH] D46140: [coroutines] std::task type (WIP)

2018-09-20 Thread Lewis Baker via Phabricator via cfe-commits
lewissbaker added inline comments. Comment at: test/std/experimental/task/sync_wait.hpp:36-37 + __isSet_ = true; +} +__cv_.notify_all(); + } The call to `notify_all()` needs to be inside the lock. Otherwise, it's possible the waiting thread may see

Re: r229575 - clang-cl: Disable frame pointer elimination at -O0

2018-09-20 Thread Reid Kleckner via cfe-commits
It looks like we don't do anything special if you run clang-cl -O0 or /O0, but it's not an error. I don't have my computer and can't run a test, but from the outside, it looks like clang-cl -O0 does generate unoptimized code without warning about an unrecognized flag, but it doesn't disable FP

[PATCH] D52315: [clang-tidy] Fix for performance-unnecessary-value-param, performance-unnecessary-copy-initialization and performance-for-range-copy

2018-09-20 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. This looks questionable to me. I don't disagree with the reasons stated about llvm types. But is that *always* true? I would personally be very surprized, and consider this a false-positive. This should at least be optional. Not sure about the default, but setting the

r342668 - Add testcases for r342667.

2018-09-20 Thread Eric Christopher via cfe-commits
Author: echristo Date: Thu Sep 20 10:22:43 2018 New Revision: 342668 URL: http://llvm.org/viewvc/llvm-project?rev=342668=rev Log: Add testcases for r342667. Added: cfe/trunk/test/Preprocessor/include-leading-nonalpha-no-suggest.c

[PATCH] D52280: Don't trim non-alphanumeric characters in 'file not found' errors for include directives.

2018-09-20 Thread Eric Christopher via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL342667: r342177 introduced a hint in cases where an #included file is not found. It… (authored by echristo, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit:

r342667 - r342177 introduced a hint in cases where an #included file is not found. It tries to find a suggestion by removing leading or trailing non-alphanumeric characters and checking if a matching

2018-09-20 Thread Eric Christopher via cfe-commits
Author: echristo Date: Thu Sep 20 10:21:56 2018 New Revision: 342667 URL: http://llvm.org/viewvc/llvm-project?rev=342667=rev Log: r342177 introduced a hint in cases where an #included file is not found. It tries to find a suggestion by removing leading or trailing non-alphanumeric characters

[PATCH] D52280: Don't trim non-alphanumeric characters in 'file not found' errors for include directives.

2018-09-20 Thread Eric Christopher via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC342667: r342177 introduced a hint in cases where an #included file is not found. It… (authored by echristo, committed by ). Changed prior to commit: https://reviews.llvm.org/D52280?vs=166184=166327#toc

[PATCH] D51926: [scan-build-py] Prevent crashes of CTU analysis by suppressing warnings

2018-09-20 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. If that helps you, then sure. I'm not sure I understand why having warnings causes the collection process to fail, but I guess ultimately it's not important.

[PATCH] D52315: [clang-tidy] Fix for performance-unnecessary-value-param, performance-unnecessary-copy-initialization and performance-for-range-copy

2018-09-20 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added inline comments. Comment at: clang-tidy/utils/TypeTraits.cpp:47 + + // Do not consider "expensive to copy" types not greater than a pointer + if (Context.getTypeSize(Type) <= Context.getTypeSize(Context.VoidPtrTy)) Please make that comment a

r342666 - [OPENMP] Fix spelling of getLoopCounter (NFC)

2018-09-20 Thread Mike Rice via cfe-commits
Author: mikerice Date: Thu Sep 20 10:19:41 2018 New Revision: 342666 URL: http://llvm.org/viewvc/llvm-project?rev=342666=rev Log: [OPENMP] Fix spelling of getLoopCounter (NFC) Modified: cfe/trunk/include/clang/AST/OpenMPClause.h cfe/trunk/lib/AST/OpenMPClause.cpp

[PATCH] D52315: [clang-tidy] Fix for performance-unnecessary-value-param, performance-unnecessary-copy-initialization and performance-for-range-copy

2018-09-20 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware created this revision. baloghadamsoftware added reviewers: alexfh, aaron.ballman, flx. The three checks mentioned in the Title are two noisy if the code uses intrusive smart (reference counting) pointers. LLVM/Clang is such a code, it has lots of such types, e.g. StringRef,

[PATCH] D52311: [clangd] Add support for hierarchical documentSymbol

2018-09-20 Thread Simon Marchi via Phabricator via cfe-commits
simark added a comment. Ohh awesome, I didn't know the LSP supported that. I'll try it it Theia when I have time. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D52311 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D52313: [clang-doc] Avoid parsing undefined base classes

2018-09-20 Thread Julie Hockett via Phabricator via cfe-commits
juliehockett created this revision. juliehockett added reviewers: jakehehrlich, leonardchan, lebedev.ri. juliehockett added a project: clang-tools-extra. Don't try to parse base classes for declarations that are not definitions (segfaults, as there is no DefinitionData to access).

[PATCH] D52300: [clangd] Implement VByte PostingList compression

2018-09-20 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. Very nice! I think the data structures can be slightly tighter, and some of the implementation could be easier to follow. But this seems like a nice win. Right-sizing the vectors seems like an important optimization. Comment at:

[PATCH] D52219: [analyzer] (1/n) Support pointee mutation analysis in ExprMutationAnalyzer.

2018-09-20 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added inline comments. Comment at: unittests/Analysis/ExprMutationAnalyzerTest.cpp:67 +if (const auto *DRE = dyn_cast(E)) { + if (DRE->getNameInfo().getAsString()[0] == 'p') +Finder = PointeeMutationFinder; shuaiwang wrote: > JonasToth

[PATCH] D52219: [analyzer] (1/n) Support pointee mutation analysis in ExprMutationAnalyzer.

2018-09-20 Thread Shuai Wang via Phabricator via cfe-commits
shuaiwang added inline comments. Comment at: unittests/Analysis/ExprMutationAnalyzerTest.cpp:67 +if (const auto *DRE = dyn_cast(E)) { + if (DRE->getNameInfo().getAsString()[0] == 'p') +Finder = PointeeMutationFinder; JonasToth wrote: > shuaiwang

[PATCH] D52308: [Sema][CodeCompletion] Fix return type of C++ destructors in code completion

2018-09-20 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. In https://reviews.llvm.org/D52308#1240680, @jkorous wrote: > Sorry my bad. You are right, we aren't showing destructors in clangd for > normal classes. The case where I noticed is kind of a corner case with > template class. > > >

[PATCH] D52311: [clangd] Add support for hierarchical documentSymbol

2018-09-20 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov planned changes to this revision. ilya-biryukov added a comment. Posted to make sure it's visible that I've started doing this. Still need to update the tests and check for the capability from the client (and fallback to SymbolInformation if client does not support the new

[PATCH] D52308: [Sema][CodeCompletion] Fix return type of C++ destructors in code completion

2018-09-20 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. In https://reviews.llvm.org/D52308#1240642, @jkorous wrote: > You might be right - I am assuming here that we want consistent behaviour > between constructors and destructors. > > IIUC ctors are currently skipped in code completions (in most cases) but they > also

[PATCH] D52311: [clangd] Add support for hierarchical documentSymbol

2018-09-20 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov created this revision. ilya-biryukov added reviewers: ioeric, sammccall, simark. Herald added subscribers: kadircet, arphaman, jkorous, MaskRay. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D52311 Files: clangd/ClangdLSPServer.cpp clangd/ClangdServer.cpp

[PATCH] D52308: [Sema][CodeCompletion] Fix return type of C++ destructors in code completion

2018-09-20 Thread Jan Korous via Phabricator via cfe-commits
jkorous added a comment. Sorry my bad. You are right, we aren't showing destructors in clangd for normal classes. The case where I noticed is kind of a corner case with template class.

[PATCH] D51809: [CUDA][HIP] Fix assertion in LookupSpecialMember

2018-09-20 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. ping https://reviews.llvm.org/D51809 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D51949: [WIP][clang-tidy] initial ideas to isolate variable declarations

2018-09-20 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev added a comment. Sorry, I didn't get time to review the patch properly, these are few stylistic comments. Hopefully, I'll be able to give more feedback when I get more time. Comment at: clang-tidy/readability/IsolateDeclCheck.cpp:21 + +#define PRINT_DEBUG 1 +

[PATCH] D52308: [Sema][CodeCompletion] Fix return type of C++ destructors in code completion

2018-09-20 Thread Jan Korous via Phabricator via cfe-commits
jkorous added a comment. You might be right - I am assuming here that we want consistent behaviour between constructors and destructors. IIUC ctors are currently skipped in code completions (in most cases) but they also don't have any type associated while result of their call definitely has

[PATCH] D52280: Don't trim non-alphanumeric characters in 'file not found' errors for include directives.

2018-09-20 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. LGTM! Repository: rC Clang https://reviews.llvm.org/D52280 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D52308: [Sema][CodeCompletion] Fix return type of C++ destructors in code completion

2018-09-20 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. When you're *calling* a destructor, I believe the expression does have type void. Are we sure this is incorrect? Calling a destructor is really unusual though. IIRC we decided to just not show them in clangd in member context (maybe this is broken or was never

[PATCH] D52266: [clang-cl] Provide separate flags for all the /O variants

2018-09-20 Thread Nico Weber via Phabricator via cfe-commits
thakis added a comment. In https://reviews.llvm.org/D52266#1240304, @hans wrote: > Sorry, I didn't realize we both set off to do this in parallel. I've > incorporated your changes into my patch. No worries, I didn't do anything I wouldn't have done for reviewing this :-) Thoughts on "As far

[PATCH] D52308: [Sema][CodeCompletion] Fix return type of C++ destructors in code completion

2018-09-20 Thread Jan Korous via Phabricator via cfe-commits
jkorous created this revision. jkorous added reviewers: arphaman, vsapsai, sammccall, ilya-biryukov. jkorous added a project: clang. Herald added subscribers: cfe-commits, dexonsmith, eraman. Destructors don't have return type "void", they don't have any return type at all. Repository: rC

r342614 - [PowerPC] [Clang] Add vector int128 pack/unpack builtins

2018-09-20 Thread QingShan Zhang via cfe-commits
Author: qshanz Date: Wed Sep 19 22:04:57 2018 New Revision: 342614 URL: http://llvm.org/viewvc/llvm-project?rev=342614=rev Log: [PowerPC] [Clang] Add vector int128 pack/unpack builtins unsigned long long builtin_unpack_vector_int128 (vector int128_t, int); vector int128_t

[PATCH] D52219: [analyzer] (1/n) Support pointee mutation analysis in ExprMutationAnalyzer.

2018-09-20 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added inline comments. Comment at: unittests/Analysis/ExprMutationAnalyzerTest.cpp:67 +if (const auto *DRE = dyn_cast(E)) { + if (DRE->getNameInfo().getAsString()[0] == 'p') +Finder = PointeeMutationFinder; shuaiwang wrote: > JonasToth

r342648 - [OPENMP] Add support for mapping memory pointed by member pointer.

2018-09-20 Thread Alexey Bataev via cfe-commits
Author: abataev Date: Thu Sep 20 06:54:02 2018 New Revision: 342648 URL: http://llvm.org/viewvc/llvm-project?rev=342648=rev Log: [OPENMP] Add support for mapping memory pointed by member pointer. Added support for map(s, s.ptr[0:1]) kind of mapping. Modified:

[PATCH] D52261: [Sema] Generate completion fix-its for C code as well

2018-09-20 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. In https://reviews.llvm.org/D52261#1240143, @yvvan wrote: > I tried that first but did not I find a way just to copy an expression (we > basically need the same expr for such case). Do you know how to properly > generate a copy of expression or some other way to

[PATCH] D52047: [clangd] Add building benchmark and memory consumption tracking

2018-09-20 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. Also not sure about the trick: - Would be surprising to see the "ms" instead of "mbytes" - Time tends to vary between runs, so using Google Benchmark's capabilities to run multiple times and report aggregated times seems useful. Not so much for the memory usage:

[PATCH] D52301: [clang] Set TypeSourceInfo for vardecl's in addition to type when we can deduce.

2018-09-20 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet created this revision. kadircet added a reviewer: ilya-biryukov. Herald added a subscriber: cfe-commits. Repository: rC Clang https://reviews.llvm.org/D52301 Files: include/clang/AST/PrettyPrinter.h include/clang/Basic/DiagnosticSemaKinds.td include/clang/Sema/Sema.h

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

2018-09-20 Thread Bevin Hansson via Phabricator via cfe-commits
ebevhan added a comment. Another ping. Anyone up for reviewing this patch? Repository: rC Clang https://reviews.llvm.org/D51211 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D52300: [clangd] Implement VByte PostingList compression

2018-09-20 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 166278. kbobyrev added a comment. - Update unit tests with iterator tree string representation to comply with the new format - Don't mark constructor `explicit` (previously it only had one parameter) - Fix `Limits` explanation comment (`ID > Limits[I]` ->

[PATCH] D52300: [clangd] Implement VByte PostingList compression

2018-09-20 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev created this revision. kbobyrev added reviewers: ioeric, sammccall, ilya-biryukov. kbobyrev added a project: clang-tools-extra. Herald added subscribers: kadircet, arphaman, jkorous, MaskRay, mgorny. kbobyrev edited the summary of this revision. This patch implements Variable-length Byte

[PATCH] D52281: [clang-tidy] Add modernize check to use std::invoke in generic code

2018-09-20 Thread Paul Fultz II via Phabricator via cfe-commits
pfultz2 added a comment. This needs a test when calling in a `constexpr` function. I believe `std::invoke` is not `constepxr`, so a function object call in a `constexpr` function should not suggest `std::invoke`. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D52281

[PATCH] D52047: [clangd] Add building benchmark and memory consumption tracking

2018-09-20 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 166271. kbobyrev added a comment. Remove `BuildMem` benchmark, which collects data about `MemIndex` building time (which is essentially nothing and therefore not really interesting). https://reviews.llvm.org/D52047 Files:

[PATCH] D52047: [clangd] Add building benchmark and memory consumption tracking

2018-09-20 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 166269. kbobyrev added a comment. Add benchmark for `SymbolSlab` loading from file. This might be useful for RIFF/YAML symbol loader optimizations. https://reviews.llvm.org/D52047 Files: clang-tools-extra/clangd/benchmarks/IndexBenchmark.cpp

[PATCH] D52292: [Sema][OpenCL] Improve diagnostics for not viable overloadable function candidates

2018-09-20 Thread Dmitry Sidorov via Phabricator via cfe-commits
sidorovd added inline comments. Comment at: include/clang/Sema/Sema.h:8576 + + /// Find and extension in an extension map and return its name + template Anastasia wrote: > and extension -> an extension ? Thanks! Comment at:

[PATCH] D52292: [Sema][OpenCL] Improve diagnostics for not viable overloadable function candidates

2018-09-20 Thread Dmitry Sidorov via Phabricator via cfe-commits
sidorovd updated this revision to Diff 166270. sidorovd marked an inline comment as done. https://reviews.llvm.org/D52292 Files: include/clang/Basic/DiagnosticSemaKinds.td include/clang/Sema/Sema.h lib/Sema/Sema.cpp lib/Sema/SemaOverload.cpp test/SemaOpenCL/extension-begin.cl Index:

[PATCH] D52047: [clangd] Add building benchmark and memory consumption tracking

2018-09-20 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 166266. kbobyrev retitled this revision from "[clangd] Add a "benchmark" for tracking memory" to "[clangd] Add building benchmark and memory consumption tracking". kbobyrev edited the summary of this revision. kbobyrev added a comment. Add symbol index

[PATCH] D52280: Don't trim non-alphanumeric characters in 'file not found' errors for include directives.

2018-09-20 Thread Christy Lee via Phabricator via cfe-commits
christylee accepted this revision. christylee added a comment. This revision is now accepted and ready to land. Thanks for the fix! Repository: rC Clang https://reviews.llvm.org/D52280 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D52268: [AST] Squeeze some bits in LinkageComputer

2018-09-20 Thread Bruno Ricci via Phabricator via cfe-commits
riccibruno updated this revision to Diff 166264. riccibruno marked 3 inline comments as done. riccibruno added a comment. Removed the superfluous static_assert. Repository: rC Clang https://reviews.llvm.org/D52268 Files: lib/AST/Linkage.h Index: lib/AST/Linkage.h

[PATCH] D51402: [OpenCL] Adding cl_intel_planar_yuv extension

2018-09-20 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: lib/Headers/opencl-c.h:26 +#if __OPENCL_C_VERSION__ >= CL_VERSION_1_2 +#ifndef cl_intel_planar_yuv +#define cl_intel_planar_yuv Anastasia wrote: > @yaxunl, do you think we need to add some kind of architecture guard

[PATCH] D52292: [Sema][OpenCL] Improve diagnostics for not viable overloadable function candidates

2018-09-20 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: include/clang/Sema/Sema.h:8576 + + /// Find and extension in an extension map and return its name + template and extension -> an extension ? Comment at: lib/Sema/Sema.cpp:1856 +std::string

[PATCH] D51484: [OpenCL] Add support of cl_intel_device_side_avc_motion_estimation extension

2018-09-20 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: include/clang/Basic/OpenCLExtensionTypes.def:27 + +INTEL_SGAVC_TYPE(mce_payload_t, McePayload) +INTEL_SGAVC_TYPE(ime_payload_t, ImePayload) AlexeySotkin wrote: > Anastasia wrote: > > AlexeySachkov wrote: > > >

[PATCH] D51464: clang: fix MIPS/N32 triple and paths

2018-09-20 Thread Simon Atanasyan via Phabricator via cfe-commits
atanasyan requested changes to this revision. atanasyan added a comment. This revision now requires changes to proceed. This patch fails the following test cases: - tools/clang/test/CodeGen/target-data.c - tools/clang/test/Driver/mips-cs.cpp Comment at:

  1   2   >