r371182 - Reland [LifetimeAnalysis] Support more STL idioms (template forward declaration and DependentNameType)

2019-09-06 Thread Matthias Gehre via cfe-commits
Author: mgehre Date: Fri Sep 6 01:56:30 2019 New Revision: 371182 URL: http://llvm.org/viewvc/llvm-project?rev=371182&view=rev Log: Reland [LifetimeAnalysis] Support more STL idioms (template forward declaration and DependentNameType) Reland after https://reviews.llvm.org/D66806 fixed the false

[PATCH] D67172: [clangd] Use pre-populated mappings for standard symbols

2019-09-06 Thread Haojian Wu via Phabricator via cfe-commits
hokein added a comment. In D67172#1657590 , @ilya-biryukov wrote: > Also considered moving the std symbol mapping into a separate > (private-to-implementation) class, e.g. we don't use suffix mappings and > symbol mappings outside system includes. > Bu

[PATCH] D67172: [clangd] Use pre-populated mappings for standard symbols

2019-09-06 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. Ok, agreed. Adding this indirection layer is probably making things a bit too complex. I'll update the patch to clearly separate the std symbol mapping and canonical includes. In D67172#1660435 , @hokein wrote: > And I'm n

[clang-tools-extra] r371194 - [clangd] Use override keyword to override the base class method, NFC

2019-09-06 Thread Haojian Wu via cfe-commits
Author: hokein Date: Fri Sep 6 03:24:39 2019 New Revision: 371194 URL: http://llvm.org/viewvc/llvm-project?rev=371194&view=rev Log: [clangd] Use override keyword to override the base class method, NFC Modified: clang-tools-extra/trunk/clangd/ParsedAST.cpp Modified: clang-tools-extra/trunk/c

[PATCH] D67024: [analyzer] NFC: Replace intrusive list of bug reports with a vector of pointers.

2019-09-06 Thread Dmitri Gribenko via Phabricator via cfe-commits
gribozavr accepted this revision. gribozavr added a comment. Still LGTM, just some nitpicks to replace iterator usage with index-based accesses (which I believe is simpler). Comment at: clang/include/clang/StaticAnalyzer/Core/BugReporter/BugReporter.h:569

[PATCH] D67172: [clangd] Use pre-populated mappings for standard symbols

2019-09-06 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov updated this revision to Diff 219061. ilya-biryukov added a comment. - Move system symbol mapping to a different class. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67172/new/ https://reviews.llvm.org/D67172 Files: clang-tools-ext

[PATCH] D67172: [clangd] Use pre-populated mappings for standard symbols

2019-09-06 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. Not sure whether the new code is a win overall, it's still a bit messy Let me know what you think. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67172/new/ https://reviews.llvm.org/D67172 __

[PATCH] D66791: [lldb][ELF] Read symbols from .gnu_debugdata sect.

2019-09-06 Thread Konrad Wilhelm Kleine via Phabricator via cfe-commits
kwk updated this revision to Diff 219038. kwk added a comment. - Fix spelling error Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66791/new/ https://reviews.llvm.org/D66791 Files: lldb/CMakeLists.txt lldb/cmake/modules/LLDBConfig.cmake lldb/

[PATCH] D67172: [clangd] Use pre-populated mappings for standard symbols

2019-09-06 Thread Haojian Wu via Phabricator via cfe-commits
hokein added inline comments. Comment at: clang-tools-extra/clangd/index/CanonicalIncludes.cpp:780 + // Prefer a mapping from the system symbols. + if (SystemSymbols) { +if (auto Result = SystemSymbols->mapHeader(Header, QualifiedName)) what's the interesti

[PATCH] D67172: [clangd] Use pre-populated mappings for standard symbols

2019-09-06 Thread Haojian Wu via Phabricator via cfe-commits
hokein added a comment. In D67172#1660469 , @ilya-biryukov wrote: > Ok, agreed. Adding this indirection layer is probably making things a bit too > complex. I'll update the patch to clearly separate the std symbol mapping and > canonical includes. > > I

[PATCH] D67140: [analyzer][NFC] Fix inconsistent references to checkers as "checks"

2019-09-06 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D67140#1659978 , @Szelethus wrote: > In D67140#1659907 , @NoQ wrote: > > > In D67140#1659872 , @aaron.ballman > > wrote: > > > > > If we're

[PATCH] D64671: [clang-tidy] New check: misc-init-local-variables

2019-09-06 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. Aside from the missing documentation bit, I think this LG. Comment at: clang-tools-extra/clang-tidy/cppcoreguidelines/InitVariablesCheck.cpp:29 + Options.getLocalOrGlobal("IncludeStyle", "llvm"))), + MathHeader(Options.get("MathHead

[PATCH] D64644: [Sema] Fixes an assertion failure while instantiation a template with an incomplete typo corrected type

2019-09-06 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! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64644/new/ https://reviews.llvm.org/D64644 ___ cfe-commits mailing lis

[PATCH] D67264: [clangd] Collect location of macro definition in the ParsedAST

2019-09-06 Thread Haojian Wu via Phabricator via cfe-commits
hokein created this revision. Herald added subscribers: cfe-commits, kadircet, arphaman, jkorous, MaskRay, ilya-biryukov. Herald added a project: clang. hokein retitled this revision from "[clangd] Collect location of macro definition in the ParsedAST allows semantic hightlighting macro definiti

[PATCH] D67264: [clangd] Collect location of macro definition in the ParsedAST

2019-09-06 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 219067. hokein added a comment. update Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67264/new/ https://reviews.llvm.org/D67264 Files: clang-tools-extra/clangd/ParsedAST.cpp clang-tools-extra/clangd/ParsedA

[PATCH] D67264: [clangd] Collect location of macro definition in the ParsedAST

2019-09-06 Thread Haojian Wu via Phabricator via cfe-commits
hokein marked an inline comment as done. hokein added inline comments. Comment at: clang-tools-extra/clangd/ParsedAST.cpp:104 // *definitions* in the preamble region of the main file). class CollectMainFileMacroExpansions : public PPCallbacks { const SourceManager &SM; -

[PATCH] D65761: Add Windows Control Flow Guard checks (/guard:cf).

2019-09-06 Thread Hans Wennborg via Phabricator via cfe-commits
hans added a comment. Herald added a subscriber: ychen. This is very exciting! I didn't look closely at the actual instrumentation code, as rnk knows that better and had some good comments. Comment at: clang/include/clang/Driver/Options.td:500 def b : JoinedOrSeparate<["-"],

[PATCH] D65917: [clang-tidy] Added check for the Google style guide's category method naming rule.

2019-09-06 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tools-extra/clang-tidy/google/RequireCategoryMethodPrefixesCheck.cpp:57 + } + std::string method_name = method_declaration->getNameAsString(); + auto owning_objc_class_interface = method_declaration->getClassInterface();

[PATCH] D67185: [RISCV] Add support for -ffixed-xX flags

2019-09-06 Thread Simon Cook via Phabricator via cfe-commits
simoncook updated this revision to Diff 219068. simoncook edited the summary of this revision. simoncook added a comment. Update based on initial feedback/going down the providing error route. Unlike AArch64, which provides an error if a function tries to call a function with arguments and any o

[PATCH] D67265: [clang-tidy] Magic number checker shouldn't warn on user defined string literals

2019-09-06 Thread Tibor Brunner via Phabricator via cfe-commits
bruntib created this revision. bruntib added reviewers: alexfh, Szelethus, 0x8000-, aaron.ballman. Herald added subscribers: cfe-commits, xazax.hun, whisperity. Herald added a project: clang. The following code snippet results a false positive report in the magic number checker: std::string

[PATCH] D67265: [clang-tidy] Magic number checker shouldn't warn on user defined string literals

2019-09-06 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added inline comments. Comment at: clang-tools-extra/test/clang-tidy/readability-magic-numbers.cpp:1 -// RUN: %check_clang_tidy %s readability-magic-numbers %t \ +// RUN: %check_clang_tidy -std=c++14 %s readability-magic-numbers %t \ // RUN: -config='{CheckOptions: \

[PATCH] D67265: [clang-tidy] Magic number checker shouldn't warn on user defined string literals

2019-09-06 Thread Florin Iucha via Phabricator via cfe-commits
0x8000- accepted this revision. 0x8000- added a comment. This revision is now accepted and ready to land. Looks good to me. Thank you for the fix. Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67265/new/ https://reviews.llvm.org/D67265 __

[PATCH] D66951: [ASTImporter] Add comprehensive tests for ODR violation handling strategies

2019-09-06 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added inline comments. Comment at: clang/unittests/AST/ASTImporterODRStrategiesTest.cpp:36 + static constexpr auto *Definition = "void X(int a) {}"; + static constexpr auto *ConflictingDefinition = "void X(double a) {}"; + BindableMatcher getPattern() { --

[PATCH] D67265: [clang-tidy] Magic number checker shouldn't warn on user defined string literals

2019-09-06 Thread Tibor Brunner via Phabricator via cfe-commits
bruntib updated this revision to Diff 219088. bruntib edited the summary of this revision. bruntib added a comment. Thank you for the suggestion. I didn't know about this behavior of `%check_clang_tidy`. Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/

[PATCH] D65182: [analyzer] Add fix-it hint support.

2019-09-06 Thread Dmitri Gribenko via Phabricator via cfe-commits
gribozavr added inline comments. Comment at: clang/include/clang/StaticAnalyzer/Core/BugReporter/BugReporter.h:491 + ArrayRef Ranges = None, + ArrayRef Fixits = None); NoQ wrote: > gribozavr wrote: > > I'm not sure i

[PATCH] D67122: [UBSan][clang][compiler-rt] Applying non-zero offset to nullptr is undefined behaviour

2019-09-06 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri marked 5 inline comments as done. lebedev.ri added inline comments. Herald added a subscriber: ychen. Comment at: clang/lib/CodeGen/CGExprScalar.cpp:4703-4720 +// 2) The sign of the difference between the computed address and the base +// pointer matches the si

[PATCH] D67058: [clang][CodeGen] Add alias for cpu_dispatch function with IFunc & Fix resolver linkage type

2019-09-06 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added inline comments. Comment at: clang/lib/CodeGen/CodeGenModule.cpp:3002 false); llvm::Constant *Resolver = GetOrCreateLLVMFunction( MangledName + ".resolver", ResolverType, GlobalDecl{}, zsrkmyn wrote: > erichkeane wrote: > >

[PATCH] D66951: [ASTImporter] Add comprehensive tests for ODR violation handling strategies

2019-09-06 Thread Gabor Marton via Phabricator via cfe-commits
martong marked 6 inline comments as done. martong added inline comments. Comment at: clang/unittests/AST/ASTImporterODRStrategiesTest.cpp:36 + static constexpr auto *Definition = "void X(int a) {}"; + static constexpr auto *ConflictingDefinition = "void X(double a) {}"; + Bind

[PATCH] D66516: [clangd] Added highlighting to types dependant on templates.

2019-09-06 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov updated this revision to Diff 219090. ilya-biryukov added a comment. - Replace UnderlyingTypeVisitor with a function - Remove PrintTo() - Also highlight references to typedefs - reformat Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66

[PATCH] D65182: [analyzer] Add fix-it hint support.

2019-09-06 Thread Dmitri Gribenko via Phabricator via cfe-commits
gribozavr accepted this revision. gribozavr added inline comments. Comment at: clang/include/clang/StaticAnalyzer/Core/BugReporter/BugReporter.h:343 + /// to produce a good fix-it hint for most path-sensitive warnings. + void addFixItHint(const FixItHint &F) { +Fixits.push

[PATCH] D66516: [clangd] Added highlighting to types dependant on templates.

2019-09-06 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov planned changes to this revision. ilya-biryukov added a comment. Now that I think about it more, maybe the simplest option is to not recurse into composite types at all E.g. a typedef to a template parameter will be highlighted as a template parameter. A typedef to a pointer ca

[PATCH] D67135: [clang-tidy] performance-inefficient-vector-operation: Support proto repeated field

2019-09-06 Thread Haojian Wu via Phabricator via cfe-commits
hokein added a comment. your patch doesn't have a full context, please upload the patch with full context (`=U9`) or use Arcanist . > I'd think the check instead should be parametrized, so this patch should >

[PATCH] D67265: [clang-tidy] Magic number checker shouldn't warn on user defined string literals

2019-09-06 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/clang-tidy/readability/MagicNumbersCheck.cpp:125 +// std::string s = "Hello World"s; +if (const UserDefinedLiteral *UDL = Parent.get()) + if (UDL->getLiteralOperatorKind() == UserDefinedL

r371205 - libclang depends on ClangDriverOptions since r352803

2019-09-06 Thread Nico Weber via cfe-commits
Author: nico Date: Fri Sep 6 06:57:12 2019 New Revision: 371205 URL: http://llvm.org/viewvc/llvm-project?rev=371205&view=rev Log: libclang depends on ClangDriverOptions since r352803 Without this, the build would sometimes fail with In file included from clang/tools/libclang/CIndexer.cpp:17

[PATCH] D64736: [clang-tidy] New bugprone-infinite-loop check for detecting obvious infinite loops

2019-09-06 Thread Dmitri Gribenko via Phabricator via cfe-commits
gribozavr added a comment. Thanks for following up! Comment at: clang-tidy/bugprone/InfiniteLoopCheck.cpp:53 + +/// \brief Return whether `Var` has a pointer of reference in `S`. +static bool hasPtrOrReferenceInStmt(const Stmt *S, const VarDecl *Var) { Please d

[PATCH] D64672: [X86] Prevent passing vectors of __int128 as in llvm IR

2019-09-06 Thread Simon Pilgrim via Phabricator via cfe-commits
RKSimon added a comment. @craig.topper Wasn't this committed at rL371169 ? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64672/new/ https://reviews.llvm.org/D64672 ___ cfe-commits mailing list cfe-commit

[PATCH] D67265: [clang-tidy] Magic number checker shouldn't warn on user defined string literals

2019-09-06 Thread Tibor Brunner via Phabricator via cfe-commits
bruntib updated this revision to Diff 219097. bruntib added a comment. Usually I'm not a big fan of `auto`, but in this case it makes sense not to duplicate the type name in the same expression. I'll use this rule of thumb in the future, thanks :) Repository: rCTE Clang Tools Extra CHANGES

[PATCH] D67274: [clangd] Improve output of semantic highlighting tests in case of failures

2019-09-06 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov created this revision. ilya-biryukov added a reviewer: hokein. Herald added subscribers: kadircet, arphaman, jkorous, MaskRay. Herald added a project: clang. Instead of matching lists of highlightings, we annotate input code with resulting highlightings and diff it against the expect

r371206 - [NFC][CodeGen][UBSan] EmitCheckedInBoundsGEP(): add some comments to pointer-overflow check

2019-09-06 Thread Roman Lebedev via cfe-commits
Author: lebedevri Date: Fri Sep 6 07:18:49 2019 New Revision: 371206 URL: http://llvm.org/viewvc/llvm-project?rev=371206&view=rev Log: [NFC][CodeGen][UBSan] EmitCheckedInBoundsGEP(): add some comments to pointer-overflow check It's rather eye-twiching, some comments may help here.. This was or

r371207 - [NFC][CodeGen][UBSan] EmitCheckedInBoundsGEP(): refactor EmitGEPOffsetInBytes() helper

2019-09-06 Thread Roman Lebedev via cfe-commits
Author: lebedevri Date: Fri Sep 6 07:18:57 2019 New Revision: 371207 URL: http://llvm.org/viewvc/llvm-project?rev=371207&view=rev Log: [NFC][CodeGen][UBSan] EmitCheckedInBoundsGEP(): refactor EmitGEPOffsetInBytes() helper It shouldn't really be inlined into the EmitCheckedInBoundsGEP(). Refacto

r371208 - [NFC][CodeGen][UBSan] EmitCheckedInBoundsGEP(): pass a vector to EmitCheck()

2019-09-06 Thread Roman Lebedev via cfe-commits
Author: lebedevri Date: Fri Sep 6 07:19:04 2019 New Revision: 371208 URL: http://llvm.org/viewvc/llvm-project?rev=371208&view=rev Log: [NFC][CodeGen][UBSan] EmitCheckedInBoundsGEP(): pass a vector to EmitCheck() Will be easier to add a new 'check' in a follow-up. This was originally part of htt

[PATCH] D66516: [clangd] Added highlighting to types dependant on templates.

2019-09-06 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov updated this revision to Diff 219100. ilya-biryukov added a comment. - Only highlight typedefs to non-composite types, simplifies everything Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66516/new/ https://reviews.llvm.org/D66516 Fil

[PATCH] D66516: [clangd] Highlight typedefs to template parameters as template parameters

2019-09-06 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. I'll send a separate change to fallback to a new highlighting type if the underlying type of a typedef is complicated. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66516/new/ https://reviews.llvm.org/D66516 _

[PATCH] D66951: [ASTImporter] Add comprehensive tests for ODR violation handling strategies

2019-09-06 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added a comment. OK Probably the `ClassTemplateSpec` can not be handled in liberal way because the AST data structure for template specializations do not allow multiple instances with same argument values? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://revi

[PATCH] D67277: [clangd] Replace HighlightingKind::NumKinds with LastKind. NFC

2019-09-06 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov created this revision. ilya-biryukov added a reviewer: hokein. Herald added subscribers: kadircet, arphaman, jkorous, MaskRay. Herald added a project: clang. The latter simplifies the client code by avoiding the need to handle it as a separate case statement. Repository: rG LLVM

[PATCH] D67122: [UBSan][clang][compiler-rt] Applying non-zero offset to nullptr is undefined behaviour

2019-09-06 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri updated this revision to Diff 219103. lebedev.ri marked 4 inline comments as done. lebedev.ri added a comment. Rebased over precommitted NFC changes, much nicer diff! :) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67122/new/ https://re

Re: r371182 - Reland [LifetimeAnalysis] Support more STL idioms (template forward declaration and DependentNameType)

2019-09-06 Thread Yvan Roux via cfe-commits
Hi Matthias, this commit broke AArch64 bots, logs are available here: http://lab.llvm.org:8011/builders/clang-cmake-aarch64-quick/builds/19917/steps/ninja%20check%201/logs/stdio Thanks, Yvan On Fri, 6 Sep 2019 at 10:54, Matthias Gehre via cfe-commits wrote: > > Author: mgehre > Date: Fri Sep

[PATCH] D67216: [cfi] Add flag to always generate call frame information

2019-09-06 Thread David Candler via Phabricator via cfe-commits
dcandler added a comment. Herald added a subscriber: ychen. I was actually torn myself on whether to put the flag in the g group or not, so I'm happy to rename it. As far as I could find, no compiler has an existing option to control this: instead armcc always includes a debug_frame section by

[PATCH] D67058: [clang][CodeGen] Add alias for cpu_dispatch function with IFunc & Fix resolver linkage type

2019-09-06 Thread Sr.Zhang via Phabricator via cfe-commits
zsrkmyn marked an inline comment as done. zsrkmyn added inline comments. Comment at: clang/lib/CodeGen/CodeGenModule.cpp:3002 false); llvm::Constant *Resolver = GetOrCreateLLVMFunction( MangledName + ".resolver", ResolverType, GlobalDecl{},

[PATCH] D60748: Fix i386 struct and union parameter alignment

2019-09-06 Thread Simon Pilgrim via Phabricator via cfe-commits
RKSimon requested changes to this revision. RKSimon added a comment. This revision now requires changes to proceed. In D60748#1524443 , @wxiao3 wrote: > Thanks for the information! > We have reverted the patch and will resubmit it when we have a complete

[PATCH] D62445: [test] Fix plugin tests

2019-09-06 Thread Don Hinton via Phabricator via cfe-commits
hintonda added a comment. In D62445#1630518 , @NoQ wrote: > I didn't make much progress so far, but i marked the test as `// UNSUPPORTED: > darwin` in rC368765 , so the buildbot is > now green starting with > http://gr

r371222 - [Diagnostics] Refactor code for -Wsizeof-pointer-div, catch more cases; also add -Wsizeof-array-div

2019-09-06 Thread David Bolvansky via cfe-commits
Author: xbolva00 Date: Fri Sep 6 09:12:48 2019 New Revision: 371222 URL: http://llvm.org/viewvc/llvm-project?rev=371222&view=rev Log: [Diagnostics] Refactor code for -Wsizeof-pointer-div, catch more cases; also add -Wsizeof-array-div Previously, -Wsizeof-pointer-div failed to catch: const int *

r371223 - [NFC] Added new tests for r371222

2019-09-06 Thread David Bolvansky via cfe-commits
Author: xbolva00 Date: Fri Sep 6 09:18:18 2019 New Revision: 371223 URL: http://llvm.org/viewvc/llvm-project?rev=371223&view=rev Log: [NFC] Added new tests for r371222 Added: cfe/trunk/test/Sema/div-sizeof-array.cpp Added: cfe/trunk/test/Sema/div-sizeof-array.cpp URL: http://llvm.org/viewv

r371226 - [NFCI] Unbreak buildbots

2019-09-06 Thread David Bolvansky via cfe-commits
Author: xbolva00 Date: Fri Sep 6 09:30:44 2019 New Revision: 371226 URL: http://llvm.org/viewvc/llvm-project?rev=371226&view=rev Log: [NFCI] Unbreak buildbots Removed: cfe/trunk/test/Sema/div-sizeof-array.cpp Modified: cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td cfe/trunk/li

[PATCH] D66951: [ASTImporter] Add comprehensive tests for ODR violation handling strategies

2019-09-06 Thread Gabor Marton via Phabricator via cfe-commits
martong marked 3 inline comments as done. martong added a comment. In D66951#1660886 , @balazske wrote: > OK > Probably the `ClassTemplateSpec` can not be handled in liberal way because > the AST data structure for template specializations do not allow m

Re: [PATCH] D67200: Add -static-openmp driver option

2019-09-06 Thread Joerg Sonnenberger via cfe-commits
On Wed, Sep 04, 2019 at 11:28:34PM +, Pirama Arumuga Nainar via Phabricator via cfe-commits wrote: > pirama created this revision. > pirama added reviewers: Hahnfeld, danalbert, srhines, joerg. > Herald added a subscriber: guansong. > Herald added a reviewer: jdoerfert. > Herald added a projec

[PATCH] D64672: [X86] Prevent passing vectors of __int128 as in llvm IR

2019-09-06 Thread Craig Topper via Phabricator via cfe-commits
craig.topper closed this revision. craig.topper added a comment. Committed in r371169, but I forgot the Differential Revision line CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64672/new/ https://reviews.llvm.org/D64672 ___ cfe-commits mail

[PATCH] D67290: [clangd] Add a new highlighting kind for typedefs

2019-09-06 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov marked an inline comment as done. ilya-biryukov added inline comments. Comment at: clang-tools-extra/clangd/SemanticHighlighting.cpp:530 + case HighlightingKind::Typedef: +return "entity.name.type.typedef.cpp"; case HighlightingKind::Namespace: -

[PATCH] D67290: [clangd] Add a new highlighting kind for typedefs

2019-09-06 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov created this revision. ilya-biryukov added a reviewer: hokein. Herald added subscribers: kadircet, arphaman, jkorous, MaskRay. Herald added a project: clang. ilya-biryukov added a parent revision: D66516: [clangd] Highlight typedefs to template parameters as template parameters. ilya

[PATCH] D67253: clang-misexpect: a standalone tool for verifying the use of __builtin_expect with PGO data

2019-09-06 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added inline comments. Comment at: clang-tools-extra/clang-misexpect/tool/ClangMisExpectMain.cpp:33 +using namespace clang::tooling; +using namespace clang::misexpect; +using Path = std::string; The `using` statements here should match clang-tool

[PATCH] D67292: [clang-tidy] Fix bug in bugprone-use-after-move check

2019-09-06 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel created this revision. ymandel added a reviewer: gribozavr. Herald added a subscriber: xazax.hun. Herald added a project: clang. The bugprone-use-after-move check exhibits false positives for certain uses of the C++17 if/switch init statements. These false positives are caused by a bug in

[PATCH] D67294: Register and parse a simplified version of '#pragma omp declare variant'

2019-09-06 Thread Andrzej Warzynski via Phabricator via cfe-commits
andwar created this revision. andwar added a reviewer: ABataev. Herald added a reviewer: jdoerfert. Herald added a project: clang. Herald added a subscriber: cfe-commits. This patch implements the basic parsing and semantic analysis of `#pragma omp declare variant`: * registers '#pragma om

[PATCH] D67253: clang-misexpect: a standalone tool for verifying the use of __builtin_expect with PGO data

2019-09-06 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added inline comments. Comment at: clang-tools-extra/clang-misexpect/ClangMisExpect.cpp:77 +break; +llvm_unreachable("Bad Profile Format given to clang-misexpect use one of " + "(clang, llvm, csllvm, sample)"); Nit: llvm_un

[PATCH] D65256: [Sema][ObjC] Mark C union fields that have non-trivial ObjC ownership qualifications as unavailable if the union is declared in a system header

2019-09-06 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Herald added a subscriber: ychen. Comment at: lib/Sema/SemaDecl.cpp:11142 +bool ignoreForTrivialityComputation(const FieldDecl *FD) { + // Ignore unavailable fields since they don't affect the triviality of the `shouldIgnoreForR

[PATCH] D67294: Register and parse a simplified version of '#pragma omp declare variant'

2019-09-06 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: include/clang/Basic/Attr.td:3202 +def OMPDeclareVariantDecl : Attr { + let Spellings = [Pragma<"omp", "declare variant">]; For the first patch we don't need the attribute, just parsing/sema analysis

[PATCH] D58094: Fix -Wnonportable-include-path suppression for header maps with absolute paths.

2019-09-06 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai marked 3 inline comments as done. vsapsai added inline comments. Comment at: clang/lib/Lex/HeaderSearch.cpp:888 bool InUserSpecifiedSystemFramework = false; -bool HasBeenMapped = false; +bool CurrentInHeaderMap = false; bool IsFrameworkFoundInDir = false

[PATCH] D65761: Add Windows Control Flow Guard checks (/guard:cf).

2019-09-06 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added inline comments. Comment at: llvm/lib/Target/X86/X86FixupCFGuard.cpp:13 +/// for such cases and replaces the pair of instructions with a single +/// call/invoke. For example: +/// hans wrote: > Naive question: Why do we generate code as in the examples

[PATCH] D67292: [clang-tidy] Fix bug in bugprone-use-after-move check

2019-09-06 Thread Dmitri Gribenko via Phabricator via cfe-commits
gribozavr accepted this revision. gribozavr added a comment. This revision is now accepted and ready to land. Thanks for the quick fix! Comment at: clang-tools-extra/test/clang-tidy/bugprone-use-after-move.cpp:1198 +} + } for (int i = 0; i < 10; ++i) {

[PATCH] D65917: [clang-tidy] Added check for the Google style guide's category method naming rule.

2019-09-06 Thread David Gatwood via Phabricator via cfe-commits
dgatwood updated this revision to Diff 219151. dgatwood marked 9 inline comments as done. dgatwood added a comment. Tweaked documentation, and replaced the one remaining instance of getNameAsString(). CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65917/new/ https://reviews.llvm.org/D65

[PATCH] D65917: [clang-tidy] Added check for the Google style guide's category method naming rule.

2019-09-06 Thread David Gatwood via Phabricator via cfe-commits
dgatwood added inline comments. Comment at: clang-tools-extra/clang-tidy/google/RequireCategoryMethodPrefixesCheck.cpp:57 + } + std::string method_name = method_declaration->getNameAsString(); + auto owning_objc_class_interface = method_declaration->getClassInterface(); -

[PATCH] D67292: [clang-tidy] Fix bug in bugprone-use-after-move check

2019-09-06 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 219152. ymandel added a comment. Added tests. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67292/new/ https://reviews.llvm.org/D67292 Files: clang-tools-extra/clang-tidy/utils/ExprSequence.cpp clang-tools

[PATCH] D67292: [clang-tidy] Fix bug in bugprone-use-after-move check

2019-09-06 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel marked 2 inline comments as done. ymandel added inline comments. Comment at: clang-tools-extra/test/clang-tidy/bugprone-use-after-move.cpp:1198 +} + } for (int i = 0; i < 10; ++i) { gribozavr wrote: > Unless you think it is redundant, could you al

[PATCH] D64644: [Sema] Fixes an assertion failure while instantiation a template with an incomplete typo corrected type

2019-09-06 Thread Mark de Wever via Phabricator via cfe-commits
Mordante added a comment. Thanks for the review. Could you commit this patch? I don't have commit access. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64644/new/ https://reviews.llvm.org/D64644 ___ cfe-commits mailing list cfe-commits@list

r371241 - [LifetimeAnalysis] don't use raw string literals in macros

2019-09-06 Thread Matthias Gehre via cfe-commits
Author: mgehre Date: Fri Sep 6 12:15:02 2019 New Revision: 371241 URL: http://llvm.org/viewvc/llvm-project?rev=371241&view=rev Log: [LifetimeAnalysis] don't use raw string literals in macros They broke the AArch64 bots (gcc does not support it) Modified: cfe/trunk/unittests/Sema/GslOwnerPoi

Re: r371182 - Reland [LifetimeAnalysis] Support more STL idioms (template forward declaration and DependentNameType)

2019-09-06 Thread Matthias Gehre via cfe-commits
Yvan, sorry! Should be fixed now. Am Fr., 6. Sept. 2019 um 16:40 Uhr schrieb Yvan Roux : > Hi Matthias, > > this commit broke AArch64 bots, logs are available here: > > > http://lab.llvm.org:8011/builders/clang-cmake-aarch64-quick/builds/19917/steps/ninja%20check%201/logs/stdio > > Thanks, > Yvan

Re: r371222 - [Diagnostics] Refactor code for -Wsizeof-pointer-div, catch more cases; also add -Wsizeof-array-div

2019-09-06 Thread Nico Weber via cfe-commits
This reports things like error: expresion will return the incorrect number of elements in the array; the array element type is 'const char *', not 'char *' which doesn't look quite right... On Fri, Sep 6, 2019 at 12:11 PM David Bolvansky via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Au

Re: r371241 - [LifetimeAnalysis] don't use raw string literals in macros

2019-09-06 Thread Nico Weber via cfe-commits
(The slightly more usual fix is to do `const char kFoo[] = R"cpp(...)cpp"; EXPECT_TRUE(matches(kFoo...)`) On Fri, Sep 6, 2019 at 3:13 PM Matthias Gehre via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Author: mgehre > Date: Fri Sep 6 12:15:02 2019 > New Revision: 371241 > > URL: http://llv

[PATCH] D67122: [UBSan][clang][compiler-rt] Applying non-zero offset to nullptr is undefined behaviour

2019-09-06 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. I will still need to see where else `EmitCheckedInBoundsGEP()` should be used, but i'm wondering if it should be best done in follow-ups, since this already catches the interesting bits.. In D67122#1659721 , @vsk wrote: > Sti

r371250 - [clang][Index][NFC] Put IndexingOptions to a separate header

2019-09-06 Thread Jan Korous via cfe-commits
Author: jkorous Date: Fri Sep 6 13:08:32 2019 New Revision: 371250 URL: http://llvm.org/viewvc/llvm-project?rev=371250&view=rev Log: [clang][Index][NFC] Put IndexingOptions to a separate header Added: cfe/trunk/include/clang/Index/IndexingOptions.h Modified: cfe/trunk/include/clang/Index

[clang-tools-extra] r371250 - [clang][Index][NFC] Put IndexingOptions to a separate header

2019-09-06 Thread Jan Korous via cfe-commits
Author: jkorous Date: Fri Sep 6 13:08:32 2019 New Revision: 371250 URL: http://llvm.org/viewvc/llvm-project?rev=371250&view=rev Log: [clang][Index][NFC] Put IndexingOptions to a separate header Modified: clang-tools-extra/trunk/clangd/XRefs.cpp clang-tools-extra/trunk/clangd/index/FileIn

Re: r371222 - [Diagnostics] Refactor code for -Wsizeof-pointer-div, catch more cases; also add -Wsizeof-array-div

2019-09-06 Thread Richard Smith via cfe-commits
In addition to the below, this also seems to be missing any test coverage for the new warning. Did you forget to add a test file? On Fri, 6 Sep 2019 at 12:38, Nico Weber via cfe-commits < cfe-commits@lists.llvm.org> wrote: > This reports things like > > error: expresion will return the incorrect

r371252 - Update comment for mangling to match extended mangling rule in r371004.

2019-09-06 Thread Richard Smith via cfe-commits
Author: rsmith Date: Fri Sep 6 13:32:01 2019 New Revision: 371252 URL: http://llvm.org/viewvc/llvm-project?rev=371252&view=rev Log: Update comment for mangling to match extended mangling rule in r371004. Modified: cfe/trunk/lib/AST/ItaniumMangle.cpp Modified: cfe/trunk/lib/AST/ItaniumMang

Re: r371004 - [c++20] Fix some ambiguities in our mangling of lambdas with explicit

2019-09-06 Thread Richard Smith via cfe-commits
On Thu, 5 Sep 2019 at 17:39, Nico Weber via cfe-commits < cfe-commits@lists.llvm.org> wrote: > On Wed, Sep 4, 2019 at 9:22 PM Richard Smith via cfe-commits < > cfe-commits@lists.llvm.org> wrote: > >> Author: rsmith >> Date: Wed Sep 4 18:23:47 2019 >> New Revision: 371004 >> >> URL: http://llvm.or

[PATCH] D67249: [Modules][PCH] Hash input files content

2019-09-06 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno marked 2 inline comments as done. bruno added a comment. > Nice! Are you planning to address the FIXME's in a later update of this patch? The FIXME's are just replaying what the code around does, both error dropping and `FileEntryRef` are recent changes that didn't make all the way throu

[PATCH] D65182: [analyzer] Add fix-it hint support.

2019-09-06 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ marked an inline comment as done. NoQ added inline comments. Comment at: clang/include/clang/StaticAnalyzer/Core/BugReporter/BugReporter.h:343 + /// to produce a good fix-it hint for most path-sensitive warnings. + void addFixItHint(const FixItHint &F) { +Fixits.push_b

[PATCH] D65182: [analyzer] Add fix-it hint support.

2019-09-06 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ marked an inline comment as done. NoQ added inline comments. Comment at: clang/include/clang/StaticAnalyzer/Core/BugReporter/BugReporter.h:491 + ArrayRef Ranges = None, + ArrayRef Fixits = None); gribozavr wrote:

[PATCH] D64671: [clang-tidy] New check: misc-init-local-variables

2019-09-06 Thread Jussi Pakkanen via Phabricator via cfe-commits
jpakkane updated this revision to Diff 219162. jpakkane added a comment. Added documentation. Well, actually just swiped it from abseil-string-find-startswith. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64671/new/ https://reviews.llvm.org/D64671 Files: clang-tools-extra/clang-tid

[PATCH] D67292: [clang-tidy] Fix bug in bugprone-use-after-move check

2019-09-06 Thread Dmitri Gribenko via Phabricator via cfe-commits
gribozavr added inline comments. Comment at: clang-tools-extra/test/clang-tidy/bugprone-use-after-move.cpp:1198 +} + } for (int i = 0; i < 10; ++i) { ymandel wrote: > gribozavr wrote: > > Unless you think it is redundant, could you also add > > > > ``` >

[PATCH] D67019: [analyzer] pr43179: CallDescription: Check number of parameters as well as number of arguments.

2019-09-06 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL371256: [analyzer] pr43179: Make CallDescription defensive against C variadic functions. (authored by dergachev, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Chan

r371256 - [analyzer] pr43179: Make CallDescription defensive against C variadic functions.

2019-09-06 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Fri Sep 6 13:55:24 2019 New Revision: 371256 URL: http://llvm.org/viewvc/llvm-project?rev=371256&view=rev Log: [analyzer] pr43179: Make CallDescription defensive against C variadic functions. Most functions that our checkers react upon are not C-style variadic functions,

[PATCH] D67249: [Modules][PCH] Hash input files content

2019-09-06 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno updated this revision to Diff 219166. bruno added a comment. Update testcase to use a more portable version of `touch` Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67249/new/ https://reviews.llvm.org/D67249 Files: clang/include/clang/Basi

[PATCH] D67249: [Modules][PCH] Hash input files content

2019-09-06 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno updated this revision to Diff 219168. bruno added a comment. Remove pasto from one of the testcases Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67249/new/ https://reviews.llvm.org/D67249 Files: clang/include/clang/Basic/DiagnosticSeriali

r371257 - [analyzer] Add minimal support for fix-it hints.

2019-09-06 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Fri Sep 6 13:55:29 2019 New Revision: 371257 URL: http://llvm.org/viewvc/llvm-project?rev=371257&view=rev Log: [analyzer] Add minimal support for fix-it hints. Allow attaching fixit hints to Static Analyzer BugReports. Fixits are attached either to the bug report itself

[PATCH] D65182: [analyzer] Add fix-it hint support.

2019-09-06 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL371257: [analyzer] Add minimal support for fix-it hints. (authored by dergachev, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit: https://r

[PATCH] D64671: [clang-tidy] New check: misc-init-local-variables

2019-09-06 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. It'll be reasonable to get IncludeStyle default from .clang-format. Comment at: clang-tools-extra/docs/ReleaseNotes.rst:71 + +- New :doc:`cppcoreguidelines-init-variables + ` check. Please sort new checks list alphabetically.

[PATCH] D67253: clang-misexpect: a standalone tool for verifying the use of __builtin_expect with PGO data

2019-09-06 Thread Paul Kirth via Phabricator via cfe-commits
paulkirth updated this revision to Diff 219171. paulkirth added a comment. Address code review Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67253/new/ https://reviews.llvm.org/D67253 Files: clang-tools-extra/CMakeLists.txt clang-tools-extra/c

[PATCH] D59637: [analyzer] Use the custom propagation rules and sinks in GenericTaintChecker

2019-09-06 Thread Borsik Gábor via Phabricator via cfe-commits
boga95 updated this revision to Diff 219172. boga95 marked 7 inline comments as done. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59637/new/ https://reviews.llvm.org/D59637 Files: clang/lib/StaticAnalyzer/Checkers/GenericTaintChecker.cpp clang/test/Analysis/taint-generic.c Index:

[PATCH] D67253: clang-misexpect: a standalone tool for verifying the use of __builtin_expect with PGO data

2019-09-06 Thread Paul Kirth via Phabricator via cfe-commits
paulkirth updated this revision to Diff 219173. paulkirth added a comment. Remove commented out code CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67253/new/ https://reviews.llvm.org/D67253 Files: clang-tools-extra/CMakeLists.txt clang-tools-extra/clang-misexpect/CMakeLists.txt c

[PATCH] D64671: [clang-tidy] New check: misc-init-local-variables

2019-09-06 Thread Jussi Pakkanen via Phabricator via cfe-commits
jpakkane marked an inline comment as done. jpakkane added a comment. > It'll be reasonable to get IncludeStyle default from .clang-format. I looked at existing checks and they all do the same thing as this one. In fact I got the code for this by directly copypasting an existing check. Grepping

[PATCH] D67302: Configure my project to use arcanist.

2019-09-06 Thread Cong Liu via Phabricator via cfe-commits
congliu created this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D67302 Files: clang-tools-extra/.arcconfig clang-tools-extra/clang-tidy/performance/InefficientVectorOperationCheck.cpp clang

  1   2   >