[PATCH] D59919: [Attributor] Deduce "returned" argument attribute

2019-03-28 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert created this revision. jdoerfert added reviewers: homerdin, hfinkel, fedor.sergeev, sanjoy, spatel, nlopes, nicholas, reames. Herald added subscribers: cfe-commits, bollu, hiraditya. Herald added projects: clang, LLVM. Deduce the "returned" argument attribute by collecting all potential

[PATCH] D59798: [WIP] Add analyzer option to limit the number of imported TUs

2019-03-28 Thread Endre Fülöp via Phabricator via cfe-commits
gamesh411 updated this revision to Diff 192571. gamesh411 added a comment. Updated option handling location to use AnalyzerOptions instead of CC1 Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59798/new/ https://reviews.llvm.org/D59798 Files: include/clang/Cros

[PATCH] D59802: [clang-tidy] Add new checker: llvm-avoid-cast-in-conditional

2019-03-28 Thread Don Hinton via Phabricator via cfe-commits
hintonda added a comment. I looked at the IR generated at `-O2`, and found that while `if (isa(y))` is a modest win over `if (dyn_cast(y)`, `if (dyn_cast_or_null(y))` generates exactly the same IR that `if(y && isa(y))` does. Also, if `y` is actually an expression that makes a function call,

r357150 - [Driver] Allow -gsplit-dwarf on ELF OSes other than Linux and Fuchsia

2019-03-28 Thread Fangrui Song via cfe-commits
Author: maskray Date: Thu Mar 28 01:24:00 2019 New Revision: 357150 URL: http://llvm.org/viewvc/llvm-project?rev=357150&view=rev Log: [Driver] Allow -gsplit-dwarf on ELF OSes other than Linux and Fuchsia In gcc, -gsplit-dwarf is handled in gcc/gcc.c as a spec (ASM_FINAL_SPEC): objcopy --extract-d

[PATCH] D59922: [Attributor] Deduce "no-capture" argument attribute

2019-03-28 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert created this revision. jdoerfert added reviewers: homerdin, hfinkel, fedor.sergeev, sanjoy, spatel, nlopes, nicholas, reames. Herald added subscribers: cfe-commits, bollu, hiraditya. Herald added projects: clang, LLVM. Add the no-capture argument attribute deduction to the Attributor fi

[PATCH] D59802: [clang-tidy] Add new checker: llvm-avoid-cast-in-conditional

2019-03-28 Thread Don Hinton via Phabricator via cfe-commits
hintonda updated this revision to Diff 192577. hintonda added a comment. - Removed the dyn_cast_or_null replacements. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59802/new/ https://reviews.llvm.org/D59802 Files: clang-tools-extra/clang-tidy/ll

r357151 - Fix tests after rC357150

2019-03-28 Thread Fangrui Song via cfe-commits
Author: maskray Date: Thu Mar 28 01:41:17 2019 New Revision: 357151 URL: http://llvm.org/viewvc/llvm-project?rev=357151&view=rev Log: Fix tests after rC357150 Modified: cfe/trunk/test/Driver/cuda-unsupported-debug-options.cu cfe/trunk/test/Driver/openmp-unsupported-debug-options.c Modifi

[PATCH] D59870: [clang-tidy] Add MagnitudeBitsUpperLimit option to bugprone-too-small-loop-variable

2019-03-28 Thread Tamás Zolnai via Phabricator via cfe-commits
ztamas updated this revision to Diff 192582. ztamas added a comment. Rebased patch on https://github.com/llvm/llvm-project.git repo. Updated the docs based on review comments. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59870/new/ https://reviews.llvm.org/D59870 Files: clang-tools-

[PATCH] D59923: [Driver] Simplify -g level computation and its interaction with -gsplit-dwarf

2019-03-28 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay created this revision. MaskRay added reviewers: dblaikie, echristo. Herald added subscribers: cfe-commits, jdoerfert, aprantl. Herald added a project: clang. Computed debug info level: -gsplit-dwarf -gmlt => 1 -gsplit-dwarf -gmlt -fno-split-dwarf-inlining => 1 -gmlt -gsplit-dwarf => 2 -gm

[PATCH] D59923: [Driver] Simplify -g level computation and its interaction with -gsplit-dwarf

2019-03-28 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 192585. MaskRay edited the summary of this revision. MaskRay added a comment. update description Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59923/new/ https://reviews.llvm.org/D59923 Files: lib/Driver/ToolChains/Clang.c

[PATCH] D59924: [PowerPC][Clang] Port MMX intrinsics and basic test cases to Power

2019-03-28 Thread Chaofan Qiu via Phabricator via cfe-commits
qiucf created this revision. qiucf added reviewers: hfinkel, nemanjai, jsji, rsmith. Herald added subscribers: cfe-commits, jdoerfert, kbarton, mgorny. Herald added a project: clang. This patch is for porting existing headers which include x86 intrinsics (MMX, SSE, SSE2, etc.) implementation to P

[PATCH] D59923: [Driver] Simplify -g level computation and its interaction with -gsplit-dwarf

2019-03-28 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 192586. MaskRay added a comment. dedent Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59923/new/ https://reviews.llvm.org/D59923 Files: lib/Driver/ToolChains/Clang.cpp test/Driver/split-debug.c Index: test/Driver/split

[PATCH] D59485: [ASTImporter] Add an ImportInternal method to allow customizing Import behavior.

2019-03-28 Thread Raphael Isemann via Phabricator via cfe-commits
teemperor updated this revision to Diff 192588. teemperor marked an inline comment as done. teemperor added a comment. - Addressed (most of) Aleksei's comments. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59485/new/ https://reviews.llvm.org/D59485 Files: clang/include/clang/AST/AST

[PATCH] D59901: [analyzer] PR41239: Fix a crash on invalid source location in NoStoreFuncVisitor.

2019-03-28 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus accepted this revision. Szelethus added a comment. An assert would be real nice in `SourceManager`, we should definitely add that, since some callbacks don't even receive a `CallEvent` object. My checker runs on `checkPostCall`, and also checks where fields lie in a system header. Re

[PATCH] D59923: [Driver] Simplify -g level computation and its interaction with -gsplit-dwarf

2019-03-28 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 192589. MaskRay edited the summary of this revision. MaskRay added a comment. Update description Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59923/new/ https://reviews.llvm.org/D59923 Files: lib/Driver/ToolChains/Clang.c

[PATCH] D59485: [ASTImporter] Add an ImportInternal method to allow customizing Import behavior.

2019-03-28 Thread Raphael Isemann via Phabricator via cfe-commits
teemperor added inline comments. Comment at: clang/unittests/AST/ASTImporterTest.cpp:590 + new RedirectingImporter(ToContext, ToFileManager, FromContext, + FromFileManager, MinimalImport, LookupTabl)); +}; a_sidorin w

[PATCH] D59485: [ASTImporter] Add an ImportInternal method to allow customizing Import behavior.

2019-03-28 Thread Gabor Marton via Phabricator via cfe-commits
martong added inline comments. Comment at: clang/unittests/AST/ASTImporterTest.cpp:590 + new RedirectingImporter(ToContext, ToFileManager, FromContext, + FromFileManager, MinimalImport, LookupTabl)); +}; teemperor wro

[PATCH] D53701: [Analyzer] Instead of recording comparisons in interator checkers do an eager state split

2019-03-28 Thread Balogh, Ádám via Phabricator via cfe-commits
baloghadamsoftware updated this revision to Diff 192593. baloghadamsoftware added a comment. Fixed double transition. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D53701/new/ https://reviews.llvm.org/D53701 Files: lib/StaticAnalyzer/Checkers/IteratorChecker.cpp Index: lib/StaticAnal

[PATCH] D59485: [ASTImporter] Add an ImportInternal method to allow customizing Import behavior.

2019-03-28 Thread Raphael Isemann via Phabricator via cfe-commits
teemperor updated this revision to Diff 192594. teemperor added a comment. Ah, I get it now. Fixed! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59485/new/ https://reviews.llvm.org/D59485 Files: clang/include/clang/AST/ASTImporter.h clang/lib/AST/ASTImporter.cpp clang/unittests/

[PATCH] D59725: Additions to creduce script

2019-03-28 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson added a comment. In D59725#1443990 , @george.burgess.iv wrote: > Only a few more nits on my side, and this LGTM. WDYT, arichardson? LGTM with the minor tempfile changes. Comment at: clang/utils/creduce-clang-crash.py:201

[PATCH] D59811: [clangd] Add fallback mode for code completion when compile command or preamble is not ready.

2019-03-28 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. I think this option should be configurable (and off by default) for the transition period. A few reasons to do so: - Before we have an actual implementation of fallback completions, the current behavior (waiting for the first preamble) actually seems like a better

[PATCH] D59861: [analyzer] NFC: Replace Taint API with a usual inter-checker communication API?

2019-03-28 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus accepted this revision. Szelethus added a comment. > "putting all such stuff into the `ProgramState` class clearly doesn't scale, > but we still didn't come up with anything better, so let's just put it in the > header and see if a better design suddenly emerges in the future after we

r357162 - [PR41247] Fixed parsing of private keyword in C++.

2019-03-28 Thread Anastasia Stulova via cfe-commits
Author: stulova Date: Thu Mar 28 04:47:14 2019 New Revision: 357162 URL: http://llvm.org/viewvc/llvm-project?rev=357162&view=rev Log: [PR41247] Fixed parsing of private keyword in C++. Fixed bug in C++ to prevent parsing 'private' as a valid address space qualifier. Differential Revision: https:

[PATCH] D57835: Fix -ftime-report with -x ir

2019-03-28 Thread Fedor Sergeev via Phabricator via cfe-commits
fedor.sergeev requested changes to this revision. fedor.sergeev added a comment. This revision now requires changes to proceed. just to make the comments visible :) CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57835/new/ https://reviews.llvm.org/D57835 __

[PATCH] D59874: [PR41247] Fixed parsing of private keyword in C++

2019-03-28 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL357162: [PR41247] Fixed parsing of private keyword in C++. (authored by stulova, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit: https://r

r357163 - Fix Wdocumentation warning. NFCI.

2019-03-28 Thread Simon Pilgrim via cfe-commits
Author: rksimon Date: Thu Mar 28 05:03:49 2019 New Revision: 357163 URL: http://llvm.org/viewvc/llvm-project?rev=357163&view=rev Log: Fix Wdocumentation warning. NFCI. Modified: cfe/trunk/include/clang/AST/OpenMPClause.h Modified: cfe/trunk/include/clang/AST/OpenMPClause.h URL: http://llvm.

[PATCH] D59927: [clangd] Support UTF-32 (i.e. codepoint) offsets.

2019-03-28 Thread Sam McCall via Phabricator via cfe-commits
sammccall created this revision. sammccall added a reviewer: ilya-biryukov. Herald added subscribers: cfe-commits, kadircet, arphaman, jkorous, MaskRay, ioeric. Herald added a project: clang. (Changes to UTF-8/UTF-16 here are NFC, moving things around to make the cases more symmetrical) Reposit

[PATCH] D59927: [clangd] Support UTF-32 (i.e. codepoint) offsets.

2019-03-28 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a reviewer: gribozavr. ilya-biryukov added a subscriber: gribozavr. ilya-biryukov added a comment. NIT: maybe remove parentheses from the change description, they seem to only add noise. Adding @gribozavr who definitely knows more about Unicode :-) Repository: rCTE Clang T

[PATCH] D59927: [clangd] Support UTF-32 (i.e. codepoint) offsets.

2019-03-28 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 Comment at: unittests/clangd/SourceCodeTests.cpp:164 + llvm::Failed()); // out of range + // middle line + EXPECT_THAT_EXPECTED(pos

[PATCH] D59900: [Sema] Fix a crash when nonnull checking

2019-03-28 Thread Michael Liao via Phabricator via cfe-commits
hliao added a comment. just explain what's the issue is and hope that help reviewers to get this fix quick. - In `Sema::DiagnoseAlwaysNonNullPointer`, we issue warnings if a `nonnull` parameter is used in null checking. It need the function declaration to check parameter attributes. That usual

[PATCH] D59376: [LibTooling] Add Transformer, a library for source-to-source transformations.

2019-03-28 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 192619. ymandel marked 2 inline comments as done. ymandel added a comment. Simplified TextGenerator, changed namespace handling, collapsed verifyTarget() into getTarget(), and other changes in response to comments. Repository: rG LLVM Github Monorepo CHA

[PATCH] D57497: [RISCV] Passing small data limitation value to RISCV backend

2019-03-28 Thread Shiva Chen via Phabricator via cfe-commits
shiva0217 updated this revision to Diff 192618. shiva0217 added a comment. Add warning message for -msmall-data-limit with -fpic or RV64 with -mcmodel=large Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57497/new/ https://reviews.llvm.org/D57497 Files: docs/C

r357167 - [Analyzer] Constraint Manager - Calculate Effective Range for Differences

2019-03-28 Thread Adam Balogh via cfe-commits
Author: baloghadamsoftware Date: Thu Mar 28 06:05:59 2019 New Revision: 357167 URL: http://llvm.org/viewvc/llvm-project?rev=357167&view=rev Log: [Analyzer] Constraint Manager - Calculate Effective Range for Differences Since rL335814, if the constraint manager cannot find a range set for `A - B`

[PATCH] D55007: [Analyzer] Constraint Manager - Calculate Effective Range for Differences

2019-03-28 Thread Balogh, Ádám via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL357167: [Analyzer] Constraint Manager - Calculate Effective Range for Differences (authored by baloghadamsoftware, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Ch

[PATCH] D59376: [LibTooling] Add Transformer, a library for source-to-source transformations.

2019-03-28 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 192623. ymandel marked 26 inline comments as done. ymandel added a comment. Adjusted test to cover case discussed in comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59376/new/ https://reviews.llvm.org/D

[PATCH] D59376: [LibTooling] Add Transformer, a library for source-to-source transformations.

2019-03-28 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel added a comment. Thanks for the detailed review and really helpful comments! Comment at: clang/include/clang/Tooling/Refactoring/Transformer.h:38 +/// @{ +using ast_matchers::CXXCtorInitializerMatcher; +using ast_matchers::DeclarationMatcher; ilya-biryu

[PATCH] D57497: [RISCV] Passing small data limitation value to RISCV backend

2019-03-28 Thread Shiva Chen via Phabricator via cfe-commits
shiva0217 marked an inline comment as done. shiva0217 added inline comments. Comment at: lib/Driver/ToolChains/Clang.cpp:1813 +} + } else if (Arg *A = Args.getLastArg(options::OPT_G)) { +SmallDataLimit = A->getValue(); apazos wrote: > Why do you we need

[PATCH] D59923: [Driver] Simplify -g level computation and its interaction with -gsplit-dwarf

2019-03-28 Thread Paul Robinson via Phabricator via cfe-commits
probinson added a comment. Commentary questions. Comment at: lib/Driver/ToolChains/Clang.cpp:3166 + // If you say "-gsplit-dwarf -gline-tables-only", -gsplit-dwarf loses. + // But -gsplit-dwarf is not a g_Group option, hence we have to check the + // order explic

[PATCH] D59932: [clang-tidy] **Prototype**: Add fix descrption to clang-tidy checks.

2019-03-28 Thread Haojian Wu via Phabricator via cfe-commits
hokein created this revision. Herald added subscribers: cfe-commits, jdoerfert, xazax.hun. Herald added a project: clang. Motivation/Context: in the code review system integrating withclang-tidy, clang-tidy doesn't provide a human-readable description of the fix. Usually developers have to preview

[PATCH] D59927: [clangd] Support UTF-32 (i.e. codepoint) offsets.

2019-03-28 Thread Sam McCall via Phabricator via cfe-commits
sammccall updated this revision to Diff 192628. sammccall added a comment. Fix capitalization. Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59927/new/ https://reviews.llvm.org/D59927 Files: clangd/Protocol.cpp clangd/Protocol.h clangd/Source

[PATCH] D58897: [ASTImporter] Make ODR error handling configurable

2019-03-28 Thread Endre Fülöp via Phabricator via cfe-commits
gamesh411 added a comment. ping @a_sidorin Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58897/new/ https://reviews.llvm.org/D58897 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-b

[PATCH] D59927: [clangd] Support UTF-32 (i.e. codepoint) offsets.

2019-03-28 Thread Sam McCall via Phabricator via cfe-commits
sammccall marked an inline comment as done. sammccall added inline comments. Comment at: unittests/clangd/SourceCodeTests.cpp:164 + llvm::Failed()); // out of range + // middle line + EXPECT_THAT_EXPECTED(positionToOffset(File, position(1, -1)), --

[PATCH] D59761: [ASTImporter] Convert ODR diagnostics inside ASTImporter implementation

2019-03-28 Thread Endre Fülöp via Phabricator via cfe-commits
gamesh411 added a comment. ping @a_sidorin @shafik Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59761/new/ https://reviews.llvm.org/D59761 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.o

[PATCH] D59932: [clang-tidy] **Prototype**: Add fix description to clang-tidy checks.

2019-03-28 Thread Haojian Wu via Phabricator via cfe-commits
hokein added a comment. This is my first attempt, still missing tests, but it should be in a shape to get early feedbacks. Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59932/new/ https://reviews.llvm.org/D59932 _

[clang-tools-extra] r357173 - [clangd] Support UTF-32 (i.e. codepoint) offsets.

2019-03-28 Thread Sam McCall via cfe-commits
Author: sammccall Date: Thu Mar 28 07:37:51 2019 New Revision: 357173 URL: http://llvm.org/viewvc/llvm-project?rev=357173&view=rev Log: [clangd] Support UTF-32 (i.e. codepoint) offsets. Summary: (Changes to UTF-8/UTF-16 here are NFC, moving things around to make the cases more symmetrical) Revie

[PATCH] D59927: [clangd] Support UTF-32 (i.e. codepoint) offsets.

2019-03-28 Thread Sam McCall via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL357173: [clangd] Support UTF-32 (i.e. codepoint) offsets. (authored by sammccall, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Repository: rL LLVM CHANGES SINC

[PATCH] D59934: Compare SourceLocations from different TUs by FileID

2019-03-28 Thread Endre Fülöp via Phabricator via cfe-commits
gamesh411 created this revision. Herald added subscribers: cfe-commits, jdoerfert, Szelethus, dkrupp. Herald added a project: clang. The comparison of SourceLocations is extended to handle locations from different translation units, making the comparison based on the corresponding FileID. Reposi

[PATCH] D59935: Disable warnings when indexing as a standalone action.

2019-03-28 Thread Sam McCall via Phabricator via cfe-commits
sammccall created this revision. sammccall added a reviewer: hokein. Herald added subscribers: cfe-commits, kadircet, arphaman, jkorous, ioeric, ilya-biryukov. Herald added a project: clang. - we don't record the warnings at all - even when -Werror is set, we don't want to stop indexing for a war

[PATCH] D59934: Compare SourceLocations from different TUs by FileID

2019-03-28 Thread Endre Fülöp via Phabricator via cfe-commits
gamesh411 added a comment. Hi! This issue came up during the generation BugReports of BugPaths containing macro-expansions, where the spelling location and expansion locations were in different files. With this change, we make such SourceLocations comparable by their FileIDs. Repository: rC

[PATCH] D59923: [Driver] Simplify -g level computation and its interaction with -gsplit-dwarf

2019-03-28 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 192637. MaskRay added a comment. Simplify comments Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59923/new/ https://reviews.llvm.org/D59923 Files: lib/Driver/ToolChains/Clang.cpp test/Driver/split-debug.c Index: test/D

[PATCH] D59923: [Driver] Simplify -g level computation and its interaction with -gsplit-dwarf

2019-03-28 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay marked 4 inline comments as done. MaskRay added inline comments. Comment at: lib/Driver/ToolChains/Clang.cpp:3167 + // But -gsplit-dwarf is not a g_Group option, hence we have to check the + // order explicitly. If -gsplit-dwarf wins, we fix DebugInfoKind later.

[PATCH] D59934: Compare SourceLocations from different TUs by FileID

2019-03-28 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. Test? Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59934/new/ https://reviews.llvm.org/D59934 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailma

[PATCH] D59935: Disable warnings when indexing as a standalone action.

2019-03-28 Thread Haojian Wu via Phabricator via cfe-commits
hokein added inline comments. Comment at: clangd/index/IndexAction.cpp:140 +// Avoids some analyses too. +CI.getDiagnosticOpts().IgnoreWarnings = true; return WrapperFrontendAction::BeginInvocation(CI); Can we add a unittest for this? IIRC, `IgnoreW

[clang-tools-extra] r357175 - [clangd] Update error message to fix tests after r357173

2019-03-28 Thread Sam McCall via cfe-commits
Author: sammccall Date: Thu Mar 28 08:07:15 2019 New Revision: 357175 URL: http://llvm.org/viewvc/llvm-project?rev=357175&view=rev Log: [clangd] Update error message to fix tests after r357173 Modified: clang-tools-extra/trunk/unittests/clangd/DraftStoreTests.cpp Modified: clang-tools-extra/

[PATCH] D59103: [clang-tidy] New checker bugprone-incomplete-comparison-operator

2019-03-28 Thread Kalle Huttunen via Phabricator via cfe-commits
kallehuttunen added a comment. In D59103#1423307 , @aaron.ballman wrote: > In D59103#1422775 , @kallehuttunen > wrote: > > > Another idea that came to my mind would be to enable this check only for > > annotated

[PATCH] D59901: [analyzer] PR41239: Fix a crash on invalid source location in NoStoreFuncVisitor.

2019-03-28 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added a comment. I've posted another test case to https://bugs.llvm.org/show_bug.cgi?id=41239. It may already be covered by the fix. Could you check? Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59901/new/ https://reviews.llvm.org/D59901 _

[PATCH] D59899: gn build: Add some build files for clangd

2019-03-28 Thread Mirko Bonadei via Phabricator via cfe-commits
mbonadei accepted this revision. mbonadei added a comment. This revision is now accepted and ready to land. Sorry for the delay, LGTM % 2 small comments. Comment at: llvm/utils/gn/secondary/clang-tools-extra/clang-apply-replacements/BUILD.gn:2 static_library("clang-apply-repl

[PATCH] D59815: [Driver] Enable -fsanitize-address-globals-dead-stripping by default on PS4.

2019-03-28 Thread pierre gousseau via Phabricator via cfe-commits
pgousseau added a comment. In D59815#1442868 , @probinson wrote: > This is fine for PS4, I'm just curious whether anyone knows if there's a > predicate that means something like "target does not use GNU tools" so we > don't have to itemize Fuschia and PS

[PATCH] D59932: [clang-tidy] **Prototype**: Add fix description to clang-tidy checks.

2019-03-28 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tidy/ClangTidyCheck.h:109 + /// not supported. + virtual llvm::StringRef fixDescription() { return ""; } + return {} could be used instead. Comment at: clang-tidy/ClangTidyDiagnostic

[PATCH] D59935: Disable warnings when indexing as a standalone action.

2019-03-28 Thread Sam McCall via Phabricator via cfe-commits
sammccall updated this revision to Diff 192650. sammccall added a comment. Herald added a subscriber: jdoerfert. Add tests, fix setting the flag too late. Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59935/new/ https://reviews.llvm.org/D59935 File

[PATCH] D59935: Disable warnings when indexing as a standalone action.

2019-03-28 Thread Sam McCall via Phabricator via cfe-commits
sammccall updated this revision to Diff 192651. sammccall added a comment. fix baseline Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59935/new/ https://reviews.llvm.org/D59935 Files: clangd/index/IndexAction.cpp unittests/clangd/IndexActionTes

[PATCH] D59935: Disable warnings when indexing as a standalone action.

2019-03-28 Thread Sam McCall via Phabricator via cfe-commits
sammccall marked an inline comment as done. sammccall added inline comments. Comment at: clangd/index/IndexAction.cpp:140 +// Avoids some analyses too. +CI.getDiagnosticOpts().IgnoreWarnings = true; return WrapperFrontendAction::BeginInvocation(CI);

[PATCH] D59873: Add additional mangling for struct members of non trivial structs

2019-03-28 Thread Dan Zimmerman via Phabricator via cfe-commits
danzimm updated this revision to Diff 192652. danzimm added a comment. Add a third level to ensure nontrivial structs within structs within structs works (this suggests that N embeddings works too). Also change the invocation of the test Repository: rG LLVM Github Monorepo CHANGES SINCE LAS

[PATCH] D59923: [Driver] Simplify -g level computation and its interaction with -gsplit-dwarf

2019-03-28 Thread Paul Robinson via Phabricator via cfe-commits
probinson accepted this revision. probinson added a comment. This revision is now accepted and ready to land. LGTM. I wish it had occurred to me to pass both OPT_g_Group and OPT_gsplit_dwarf to the same getLastArgs call in the first place. Repository: rC Clang CHANGES SINCE LAST ACTION ht

[PATCH] D59873: Add additional mangling for struct members of non trivial structs

2019-03-28 Thread Dan Zimmerman via Phabricator via cfe-commits
danzimm added a comment. @smeenai good idea on the third level! Yep, I'll need somebody to commit this for me, thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59873/new/ https://reviews.llvm.org/D59873

[PATCH] D59935: Disable warnings when indexing as a standalone action.

2019-03-28 Thread Haojian Wu via Phabricator via cfe-commits
hokein accepted this revision. hokein added inline comments. This revision is now accepted and ready to land. Comment at: clangd/index/IndexAction.cpp:138 CI.getLangOpts().CommentOpts.ParseAllComments = true; +// Index the whole file even if there are warnings and -Werro

[PATCH] D59873: Add additional mangling for struct members of non trivial structs

2019-03-28 Thread Shoaib Meenai via Phabricator via cfe-commits
smeenai added a comment. Looks good. I'll commit this. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59873/new/ https://reviews.llvm.org/D59873 ___ cfe-commits mailing list cfe-commits@lists.llvm.org h

[PATCH] D59887: [Syntax] Introduce TokenBuffer, start clangToolingSyntax library

2019-03-28 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov updated this revision to Diff 192660. ilya-biryukov marked an inline comment as done. ilya-biryukov added a comment. - Rename macro expansion to macro invocation everywhere - Tweak comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/

[PATCH] D59899: gn build: Add some build files for clangd

2019-03-28 Thread Nico Weber via Phabricator via cfe-commits
thakis marked 2 inline comments as done. thakis added a comment. Thanks! Landing with comments addressed. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59899/new/ https://reviews.llvm.org/D59899 ___ cfe-commits mailing list cfe-commits@list

[PATCH] D59887: [Syntax] Introduce TokenBuffer, start clangToolingSyntax library

2019-03-28 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov updated this revision to Diff 192661. ilya-biryukov added a comment. - s/macroMacroInvocation/something else... Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59887/new/ https://reviews.llvm.org/D59887 Files: clang/include/clang/Too

[clang-tools-extra] r357182 - gn build: Add some build files for clangd

2019-03-28 Thread Nico Weber via cfe-commits
Author: nico Date: Thu Mar 28 09:53:32 2019 New Revision: 357182 URL: http://llvm.org/viewvc/llvm-project?rev=357182&view=rev Log: gn build: Add some build files for clangd Enough to build the clangd binaries, but this is still missing build files for: - fuzzer - indexer - index/dex/dexp - benchm

[PATCH] D59899: gn build: Add some build files for clangd

2019-03-28 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL357182: gn build: Add some build files for clangd (authored by nico, committed by ). Changed prior to commit: https://reviews.llvm.org/D59899?vs=192509&id=192663#toc Repository: rL LLVM CHANGES SINC

[PATCH] D59814: [Testing] Move clangd::Annotations to llvm testing support

2019-03-28 Thread Dmitri Gribenko via Phabricator via cfe-commits
gribozavr accepted this revision. gribozavr added inline comments. This revision is now accepted and ready to land. Comment at: llvm/include/llvm/Testing/Support/Annotations.h:9 // // Annotations lets you mark points and ranges inside source code, for tests: // ---

[PATCH] D59725: Additions to creduce script

2019-03-28 Thread Amy Huang via Phabricator via cfe-commits
akhuang added inline comments. Comment at: clang/utils/creduce-clang-crash.py:212 + +cmd = self.get_crash_cmd() + ['-E', '-P'] +try: arichardson wrote: > Some crash messages might include the line numbers, do you think it makes > sense to fall back to ru

r357184 - [CodeGen] Add additional mangling for struct members of non trivial structs

2019-03-28 Thread Shoaib Meenai via cfe-commits
Author: smeenai Date: Thu Mar 28 10:01:20 2019 New Revision: 357184 URL: http://llvm.org/viewvc/llvm-project?rev=357184&view=rev Log: [CodeGen] Add additional mangling for struct members of non trivial structs In https://bugs.llvm.org/show_bug.cgi?id=41206 we observe bad codegen when embedding a

[PATCH] D59725: Additions to creduce script

2019-03-28 Thread Amy Huang via Phabricator via cfe-commits
akhuang updated this revision to Diff 192669. akhuang marked 3 inline comments as done. akhuang added a comment. Add preprocessing with clang -E only; use `with` for opening files CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59725/new/ https://reviews.llvm.org/D59725 Files: clang/ut

[PATCH] D59873: Add additional mangling for struct members of non trivial structs

2019-03-28 Thread Shoaib Meenai via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL357184: [CodeGen] Add additional mangling for struct members of non trivial structs (authored by smeenai, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed pri

[clang-tools-extra] r357186 - Disable warnings when indexing as a standalone action.

2019-03-28 Thread Sam McCall via cfe-commits
Author: sammccall Date: Thu Mar 28 10:07:28 2019 New Revision: 357186 URL: http://llvm.org/viewvc/llvm-project?rev=357186&view=rev Log: Disable warnings when indexing as a standalone action. Summary: - we don't record the warnings at all - we don't want to stop indexing if we hit error-limit due

[PATCH] D54881: [clang-format] Prevent Clang-Format from editing leading whitespace on lines outside of the format range

2019-03-28 Thread Manuel Klimek via Phabricator via cfe-commits
klimek added a comment. I just verified why this doesn't break for our CI: The trick is that if the indent is actually off (as opposed to being correct, but tab vs spaces), we do re-indent until we find an indent that's correct. The fix that would make me happier, I think, is to do the same thing

[PATCH] D59935: Disable warnings when indexing as a standalone action.

2019-03-28 Thread Sam McCall via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. sammccall marked an inline comment as done. Closed by commit rL357186: Disable warnings when indexing as a standalone action. (authored by sammccall, committed by ). Herald added a project: LLVM. Herald added a subscriber: l

[PATCH] D59814: [Testing] Move clangd::Annotations to llvm testing support

2019-03-28 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov updated this revision to Diff 192673. ilya-biryukov marked 4 inline comments as done. ilya-biryukov added a comment. - Move Range into the body of Annotations - Use triple-slash comments - Added a FIXME that we might want to change the syntax - Move the doc comment to the class Rep

[PATCH] D28462: clang-format: Add new style option AlignConsecutiveMacros

2019-03-28 Thread Manuel Klimek via Phabricator via cfe-commits
klimek added inline comments. Comment at: lib/Format/WhitespaceManager.cpp:520 + + AlignMacroSequence(StartOfSequence, EndOfSequence, MinColumn, MaxColumn, + FoundMatchOnLine, AlignMacrosMatches, Changes); Why are we calling AlignMacroSequenc

[PATCH] D59814: [Testing] Move clangd::Annotations to llvm testing support

2019-03-28 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. I've added a FIXME to the class. Also want to add some basic tests before landing this. Comment at: clang-tools-extra/unittests/clangd/Annotations.h:8 //===--===// -// -// Annot

r357187 - Make helper functions static. NFC.

2019-03-28 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Thu Mar 28 10:18:42 2019 New Revision: 357187 URL: http://llvm.org/viewvc/llvm-project?rev=357187&view=rev Log: Make helper functions static. NFC. Modified: cfe/trunk/lib/CodeGen/BackendUtil.cpp cfe/trunk/lib/Sema/SemaOpenMP.cpp cfe/trunk/lib/StaticAnalyzer/Core/BugR

r357195 - [WebAssembly] Reland of rL356953 (4dcf3acce6)

2019-03-28 Thread Sam Clegg via cfe-commits
Author: sbc Date: Thu Mar 28 10:45:18 2019 New Revision: 357195 URL: http://llvm.org/viewvc/llvm-project?rev=357195&view=rev Log: [WebAssembly] Reland of rL356953 (4dcf3acce6) The previous patch was missing GetProgramPath() in the return value of getLinkerPath(). See https://reviews.llvm.org/D59

[PATCH] D59811: [clangd] Add fallback mode for code completion when compile command or preamble is not ready.

2019-03-28 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 192683. ioeric marked 9 inline comments as done. ioeric added a comment. - address review comments. Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59811/new/ https://reviews.llvm.org/D59811 Files: clangd/Clangd

[PATCH] D59811: [clangd] Add fallback mode for code completion when compile command or preamble is not ready.

2019-03-28 Thread Eric Liu via Phabricator via cfe-commits
ioeric added a comment. In D59811#1445701 , @ilya-biryukov wrote: > I think this option should be configurable (and off by default) for the > transition period. A few reasons to do so: > > - Before we have an actual implementation of fallback completions

r357197 - [Driver] Default Android toolchains to noexecstack.

2019-03-28 Thread Dan Albert via cfe-commits
Author: danalbert Date: Thu Mar 28 11:08:28 2019 New Revision: 357197 URL: http://llvm.org/viewvc/llvm-project?rev=357197&view=rev Log: [Driver] Default Android toolchains to noexecstack. Android does not support executable stacks. Reviewers: srhines, pirama Reviewed By: pirama Subscribers: cf

[PATCH] D59407: [clangd] Add RelationSlab

2019-03-28 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. (Sorry to arrive late at this discussion, I'm just back from leave. I have some suggestions and would appreciate your thoughts, but if simply this feels too much like going around in circles I'm happy to work out how we can address this after this patch lands instead.

[PATCH] D53343: [Driver] Default Android toolchains to noexecstack.

2019-03-28 Thread Dan Albert via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC357197: [Driver] Default Android toolchains to noexecstack. (authored by danalbert, committed by ). Changed prior to commit: https://reviews.llvm.org/D53343?vs=169901&id=192686#toc Repository: rC Cla

[PATCH] D59887: [Syntax] Introduce TokenBuffer, start clangToolingSyntax library

2019-03-28 Thread Dmitri Gribenko via Phabricator via cfe-commits
gribozavr added inline comments. Comment at: clang/include/clang/Tooling/Syntax/TokenBuffer.h:69 + /// The tokens after preprocessor replacements. + llvm::ArrayRef tokens(const TokenBuffer &B) const; + /// Tokens that appear in the text of the file, i.e. a name of an object-li

[PATCH] D59008: [AMDGPU] Switch default dwarf version to 5

2019-03-28 Thread Scott Linder via Phabricator via cfe-commits
scott.linder updated this revision to Diff 192688. scott.linder added a comment. Add a test to confirm split-dwarf is supported for the amdhsa OS in the driver. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59008/new/ https://reviews.llvm.org/D59008 Files: lib/Driver/ToolChains/AMDGP

[PATCH] D59923: [Driver] Simplify -g level computation and its interaction with -gsplit-dwarf

2019-03-28 Thread David Blaikie via Phabricator via cfe-commits
dblaikie requested changes to this revision. dblaikie added a comment. This revision now requires changes to proceed. What's the general motivation for this work/changes? > -gmlt -gsplit-dwarf -fno-split-dwarf-inlining => special: 1 (before) 2 (after) This ^ is the only semantic change due to th

[PATCH] D59932: [clang-tidy] **Prototype**: Add fix description to clang-tidy checks.

2019-03-28 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tidy/ClangTidyCheck.h:107 + /// fixes for different cases. + /// - clang compiler diagnostics and clang static analyzer diagnostics are + /// not supported. I think Clang and Clang Static Analyz

[PATCH] D59932: [clang-tidy] **Prototype**: Add fix description to clang-tidy checks.

2019-03-28 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added a comment. I think the idea is good and implementation, too. If we iterate all checks anyway (probably?) we could think about adding a severity to the checks, too? I know that code-checker and code-compass have something like this to signal importance of problems (say bugprone a

[PATCH] D59870: [clang-tidy] Add MagnitudeBitsUpperLimit option to bugprone-too-small-loop-variable

2019-03-28 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added a comment. > I think it's the easiest way to specify the bits of the ineteger type to > limit the catches. In real life, I met with this overflow / infinite loop > problem with 16-bit short type, so I think the real use cases are 8 and 16 > bit integers. It seems intuitive to me

[PATCH] D59932: [clang-tidy] **Prototype**: Add fix description to clang-tidy checks.

2019-03-28 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. In D59932#1446533 , @JonasToth wrote: > I think the idea is good and implementation, too. If we iterate all checks > anyway (probably?) we could think about adding a severity to the checks, too? > > I know that code-checker

[PATCH] D59953: Rename clang-tools-extra lit cfg files to lit.site.cfg.py

2019-03-28 Thread Nico Weber via Phabricator via cfe-commits
thakis created this revision. thakis added a reviewer: zturner. Herald added a subscriber: mgorny. thakis added a comment. Actually, let me rename lit.cfg to lit.cfg.py too, one sec... Follow-up to r313892, which did this for clang and llvm. https://reviews.llvm.org/D59953 Files: clang-tool

[PATCH] D59953: Rename clang-tools-extra lit cfg files to lit.site.cfg.py

2019-03-28 Thread Nico Weber via Phabricator via cfe-commits
thakis added a comment. Actually, let me rename lit.cfg to lit.cfg.py too, one sec... CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59953/new/ https://reviews.llvm.org/D59953 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://l

[PATCH] D28462: clang-format: Add new style option AlignConsecutiveMacros

2019-03-28 Thread Nick Renieris via Phabricator via cfe-commits
VelocityRa added inline comments. Comment at: lib/Format/WhitespaceManager.cpp:520 + + AlignMacroSequence(StartOfSequence, EndOfSequence, MinColumn, MaxColumn, + FoundMatchOnLine, AlignMacrosMatches, Changes); klimek wrote: > Why are we calli

  1   2   >