r363127 - [NFC] Test commit

2019-06-12 Thread Nikolai Kosjar via cfe-commits
Author: nik Date: Wed Jun 12 00:50:48 2019 New Revision: 363127 URL: http://llvm.org/viewvc/llvm-project?rev=363127&view=rev Log: [NFC] Test commit Modified: cfe/trunk/README.txt Modified: cfe/trunk/README.txt URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/README.txt?rev=363127&r1=36312

[PATCH] D62525: [Analyzer] Add new visitor to the iterator checkers

2019-06-12 Thread Balogh, Ádám via Phabricator via cfe-commits
baloghadamsoftware updated this revision to Diff 204227. baloghadamsoftware added a comment. Visitors now track increments and decrements. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62525/new/ https://reviews.llvm.org/D62525 Files: lib/StaticAnalyzer/Checkers/IteratorChecker.cpp

[PATCH] D63149: Added AST matcher for ignoring elidable constructors

2019-06-12 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom updated this revision to Diff 204229. jvikstrom added a comment. - Made ignoreElidable also ignore materializeTemporaryExpr and reformatted code Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63149/new/ https://reviews.llvm.org/D63149 Fil

[PATCH] D63149: Added AST matcher for ignoring elidable constructors

2019-06-12 Thread Dmitri Gribenko via Phabricator via cfe-commits
gribozavr added inline comments. Comment at: clang/include/clang/ASTMatchers/ASTMatchers.h:6455 +/// Matches expressions that match InnerMatcher after any elidable constructor +/// are stripped off. In C++17 copy elidable constructors are no longer being "Match

[PATCH] D63188: Fixed a crash in misc-redundant-expression ClangTidy checker

2019-06-12 Thread Dmitri Gribenko via Phabricator via cfe-commits
gribozavr created this revision. gribozavr added a reviewer: ilya-biryukov. Herald added a project: clang. Herald added a subscriber: cfe-commits. It was trying to pass a dependent expression into constant evaluator. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D63188 Files:

[PATCH] D63188: Fixed a crash in misc-redundant-expression ClangTidy checker

2019-06-12 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov accepted this revision. ilya-biryukov added a comment. This revision is now accepted and ready to land. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63188/new/ https://reviews.llvm.org/D63188 _

[clang-tools-extra] r363133 - Fixed a crash in misc-redundant-expression ClangTidy checker

2019-06-12 Thread Dmitri Gribenko via cfe-commits
Author: gribozavr Date: Wed Jun 12 01:40:53 2019 New Revision: 363133 URL: http://llvm.org/viewvc/llvm-project?rev=363133&view=rev Log: Fixed a crash in misc-redundant-expression ClangTidy checker Summary: It was trying to pass a dependent expression into constant evaluator. Reviewers: ilya-biry

[PATCH] D63188: Fixed a crash in misc-redundant-expression ClangTidy checker

2019-06-12 Thread Dmitri Gribenko via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL363133: Fixed a crash in misc-redundant-expression ClangTidy checker (authored by gribozavr, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit:

[PATCH] D63149: Added AST matcher for ignoring elidable constructors

2019-06-12 Thread Haojian Wu via Phabricator via cfe-commits
hokein added inline comments. Comment at: clang/include/clang/ASTMatchers/ASTMatchers.h:6477 +/// matches ``D1 = B(B(1))`` +AST_MATCHER_P(Expr, ignoringElidableMoveConstructorCall, + ast_matchers::internal::Matcher, InnerMatcher) { Is the matcher onl

[PATCH] D62804: [clangd] Enable extraction of system includes from custom toolchains

2019-06-12 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 204243. kadircet added a comment. - Fix off-by-one bug and improve lit test Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62804/new/ https://reviews.llvm.org/D62804 Files: clang-tools-extra/clangd/CMakeList

[PATCH] D63149: Added AST matcher for ignoring elidable constructors

2019-06-12 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom updated this revision to Diff 204244. jvikstrom marked an inline comment as done. jvikstrom added a comment. - Updated example and fixed edge case in ignoringElidableConstructorCall Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63149/new/

[PATCH] D63149: Added AST matcher for ignoring elidable constructors

2019-06-12 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom updated this revision to Diff 204245. jvikstrom added a comment. - Using CamelCase and also renamed ignoringElidableMoveConstructorCall to ignoringElidableConstructorCall Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63149/new/ https://r

[PATCH] D63192: [Diagnostics] Implement -Wswitch-default

2019-06-12 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 created this revision. xbolva00 added reviewers: hfinkel, lattner, rsmith. Herald added a project: clang. Herald added a subscriber: cfe-commits. For MSVC compatibility, based on request in https://bugs.llvm.org/show_bug.cgi?id=4546. Repository: rC Clang https://reviews.llvm.org/D63

[PATCH] D63193: [clangd] Fix typo in GUARDED_BY()

2019-06-12 Thread Nikolai Kosjar via Phabricator via cfe-commits
nik created this revision. nik added reviewers: ilya-biryukov, kadircet, sammccall. Herald added subscribers: cfe-commits, arphaman, jkorous, MaskRay, javed.absar. Herald added a project: clang. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D63193 Files: clang-tools-extra/clan

[PATCH] D63192: [Diagnostics] Implement -Wswitch-default

2019-06-12 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 planned changes to this revision. xbolva00 added a comment. I will work on this after we land https://reviews.llvm.org/D63139. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63192/new/ https://reviews.llvm.org/D63192 ___

[PATCH] D63193: [clangd] Fix typo in GUARDED_BY()

2019-06-12 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov accepted this revision. ilya-biryukov added a comment. This revision is now accepted and ready to land. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63193/new/ https://reviews.llvm.org/D63193 _

[clang-tools-extra] r363139 - [clangd] Fix typo in GUARDED_BY()

2019-06-12 Thread Nikolai Kosjar via cfe-commits
Author: nik Date: Wed Jun 12 04:01:19 2019 New Revision: 363139 URL: http://llvm.org/viewvc/llvm-project?rev=363139&view=rev Log: [clangd] Fix typo in GUARDED_BY() Reviewers: ilya-biryukov, kadircet, sammccall Subscribers: javed.absar, MaskRay, jkorous, arphaman, cfe-commits Tags: #clang Diffe

[PATCH] D63139: [Diagnostics] Implement -Wswitch-unreachable

2019-06-12 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 updated this revision to Diff 204253. xbolva00 added a comment. Warn in more cases. Added many new tests. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63139/new/ https://reviews.llvm.org/D63139 Files: include/clang/Basic/DiagnosticGroups.td include/clang/Basic/DiagnosticS

Re: r363009 - [Frontend] SetUpDiagnosticLog should handle unowned diagnostic consumer

2019-06-12 Thread Ilya Biryukov via cfe-commits
Sure, that should work just fine. Could you also add a comment what events setting the log file sets in motion? It is not obvious from the test code. On Tue, Jun 11, 2019 at 6:51 PM Alex L wrote: > Hmm, the logging was meant to exercise the creation of chained diagnostic > consumer, so without i

[PATCH] D63139: [Diagnostics] Implement -Wswitch-unreachable

2019-06-12 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 updated this revision to Diff 204254. xbolva00 added a comment. Attached forgotten tests CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63139/new/ https://reviews.llvm.org/D63139 Files: include/clang/Basic/DiagnosticGroups.td include/clang/Basic/DiagnosticSemaKinds.td lib

[PATCH] D63193: [clangd] Fix typo in GUARDED_BY()

2019-06-12 Thread Nikolai Kosjar via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL363139: [clangd] Fix typo in GUARDED_BY() (authored by nik, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.llvm.org/D6319

[PATCH] D63192: [Diagnostics] Implement -Wswitch-default

2019-06-12 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 marked an inline comment as done. xbolva00 added inline comments. Comment at: lib/Sema/SemaStmt.cpp:869 + SwitchCase *SC = SS->getSwitchCaseList(); + if (!SC) +Diag(SS->getBeginLoc(), diag::warn_empty_switch_body); TODO: if (!SC) -> switch has no

[PATCH] D63140: [clangd] Return TextEdits from ClangdServer::applyTweak

2019-06-12 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. @hokein just realized you might be a better reviewer, since this makes `applyTweak` aligned with `rename`. And you implemented `rename` in the first place Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63140/new/ htt

[PATCH] D63080: [analyzer] Track indices of arrays

2019-06-12 Thread Balogh, Ádám via Phabricator via cfe-commits
baloghadamsoftware requested changes to this revision. baloghadamsoftware added inline comments. This revision now requires changes to proceed. Comment at: clang/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp:1681 +trackExpressionValue( +LVNode, Arr->getIdx(), report

[PATCH] D63140: [clangd] Return TextEdits from ClangdServer::applyTweak

2019-06-12 Thread Haojian Wu via Phabricator via cfe-commits
hokein accepted this revision. hokein added a comment. This revision is now accepted and ready to land. looks good. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63140/new/ https://reviews.llvm.org/D63140

[clang-tools-extra] r363150 - [clangd] Return TextEdits from ClangdServer::applyTweak

2019-06-12 Thread Ilya Biryukov via cfe-commits
Author: ibiryukov Date: Wed Jun 12 05:03:24 2019 New Revision: 363150 URL: http://llvm.org/viewvc/llvm-project?rev=363150&view=rev Log: [clangd] Return TextEdits from ClangdServer::applyTweak Summary: Instead of `tooling::Replacements`. So that embedders do not need to store the contents of the f

[PATCH] D63140: [clangd] Return TextEdits from ClangdServer::applyTweak

2019-06-12 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL363150: [clangd] Return TextEdits from ClangdServer::applyTweak (authored by ibiryukov, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit: ht

[PATCH] D62899: [analyzer][UninitializedObjectChecker] Mark uninitialized regions as interesting.

2019-06-12 Thread Balogh, Ádám via Phabricator via cfe-commits
baloghadamsoftware added a comment. Looks much better than the original one, but why did the warning move to the correct place just because marking the region as interesting? Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62899/new/ https://reviews.llvm.org/D6289

[PATCH] D62804: [clangd] Enable extraction of system includes from custom toolchains

2019-06-12 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added a comment. In D62804#1538202 , @ilya-biryukov wrote: > In D62804#1538155 , @kadircet wrote: > > > For example a gcc cross compiling to arm comes with its own system includes > > and has some mechani

[PATCH] D63167: [Clang] Remove obsolete -enable-split-dwarf={single,split}

2019-06-12 Thread Aaron Puchert via Phabricator via cfe-commits
aaronpuchert marked an inline comment as done. aaronpuchert added inline comments. Comment at: include/clang/Basic/CodeGenOptions.def:263 -ENUM_CODEGENOPT(SplitDwarfMode, DwarfFissionKind, 2, NoFission) ///< DWARF fission mode to use. +CODEGENOPT(EnableSplitDwarf, 1, 0) ///< W

[PATCH] D59673: [Clang] Harmonize Split DWARF options with llc

2019-06-12 Thread Aaron Puchert via Phabricator via cfe-commits
aaronpuchert added a subscriber: tejohnson. aaronpuchert added inline comments. Comment at: lib/CodeGen/BackendUtil.cpp:1345 Conf.RemarksPasses = CGOpts.OptRecordPasses; - Conf.DwoPath = CGOpts.SplitDwarfFile; + Conf.DwoPath = CGOpts.SplitDwarfOutput; switch (Action) { --

[PATCH] D63149: Added AST matcher for ignoring elidable constructors

2019-06-12 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom updated this revision to Diff 204269. jvikstrom marked 3 inline comments as done. jvikstrom added a comment. - Added match conditionally overload to control in what language standard a match should run in Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://revie

[PATCH] D63194: [clangd] Link in target infos and pass target and mode while invoking driver

2019-06-12 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet created this revision. kadircet added a reviewer: ilya-biryukov. Herald added subscribers: cfe-commits, arphaman, jkorous, MaskRay, mgorny. Herald added a project: clang. This enables clangd to pick up default include search and predefines for toolchains defined in clang. Repository:

[PATCH] D63194: [clangd] Link in target infos and pass target and mode while invoking driver

2019-06-12 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Comment at: clang-tools-extra/clangd/GlobalCompilationDatabase.cpp:36 Cmd.CommandLine = ArgsAdjuster(Cmd.CommandLine, Cmd.Filename); + tooling::addTargetAndModeForProgramName(Cmd.CommandLine, Cmd.CommandLine[0]); // Inject the resource

[PATCH] D59673: [Clang] Harmonize Split DWARF options with llc

2019-06-12 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson added inline comments. Comment at: lib/CodeGen/BackendUtil.cpp:1345 Conf.RemarksPasses = CGOpts.OptRecordPasses; - Conf.DwoPath = CGOpts.SplitDwarfFile; + Conf.DwoPath = CGOpts.SplitDwarfOutput; switch (Action) { aaronpuchert wrote: > aaronpuche

[PATCH] D63149: Added AST matcher for ignoring elidable constructors

2019-06-12 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom updated this revision to Diff 204277. jvikstrom marked 10 inline comments as done. jvikstrom added a comment. - Fixed wrong formatting in test code Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63149/new/ https://reviews.llvm.org/D63149

[PATCH] D63194: [clangd] Link in target infos and pass target and mode while invoking driver

2019-06-12 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 204278. kadircet marked 3 inline comments as done. kadircet added a comment. - Add comments to the test Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63194/new/ https://reviews.llvm.org/D63194 Files: clang-

[PATCH] D63194: [clangd] Link in target infos and pass target and mode while invoking driver

2019-06-12 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clang-tools-extra/clangd/GlobalCompilationDatabase.cpp:36 Cmd.CommandLine = ArgsAdjuster(Cmd.CommandLine, Cmd.Filename); + tooling::addTargetAndModeForProgramName(Cmd.CommandLine, Cmd.CommandLine[0]); // Inject the resource dir.

[PATCH] D63194: [clangd] Link in target infos and pass target and mode while invoking driver

2019-06-12 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Comment at: clang-tools-extra/clangd/GlobalCompilationDatabase.cpp:36 Cmd.CommandLine = ArgsAdjuster(Cmd.CommandLine, Cmd.Filename); + tooling::addTargetAndModeForProgramName(Cmd.CommandLine, Cmd.CommandLine[0]); // Inject the resource

[PATCH] D63194: [clangd] Link in target infos and pass target and mode while invoking driver

2019-06-12 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/test/target_info.test:8 +# (with the extra slash in the front), so we add it here. +# RUN: sed -e "s|file://\([A-Z]\):/|file:///\1:/|g" %t.test.1 > %t.test +

[PATCH] D63149: Added AST matcher for ignoring elidable constructors

2019-06-12 Thread Dmitri Gribenko via Phabricator via cfe-commits
gribozavr added inline comments. Comment at: clang/unittests/ASTMatchers/ASTMatchersNarrowingTest.cpp:600 + EXPECT_TRUE(matches(code2, matcher2, LanguageMode::CXX11OrLater)); + EXPECT_TRUE(matches(code3, matcher3, LanguageMode::CXX11OrLater)); +} Please inline

[PATCH] D62839: [clangd] Index API and implementations for relations

2019-06-12 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added a comment. LGTM, except the batch query support. Comment at: clang-tools-extra/clangd/index/FileIndex.cpp:97 + +SymbolSlab indexHeaderSymbols(ASTContext &AST, std::shared_ptr PP, + const CanonicalIncludes &Includes) { ---

[PATCH] D63149: Added AST matcher for ignoring elidable constructors

2019-06-12 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom updated this revision to Diff 204282. jvikstrom marked 7 inline comments as done. jvikstrom added a comment. - Using switch for choosing language standard Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63149/new/ https://reviews.llvm.org/D

[PATCH] D63149: Added AST matcher for ignoring elidable constructors

2019-06-12 Thread Dmitri Gribenko via Phabricator via cfe-commits
gribozavr added inline comments. Comment at: clang/unittests/ASTMatchers/ASTMatchersTest.h:69 + CXX17OrLater, + CXX2AOrLater +}; Cxx2aOrLater? (no need to uppercase things) Comment at: clang/unittests/ASTMatchers/ASTMatchersTest.h:159 +s

[PATCH] D58880: [clangd] Type hierarchy subtypes

2019-06-12 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added a comment. mostly LG, thanks! Comment at: clang-tools-extra/clangd/XRefs.cpp:1057 + auto &CD = S.Definition ? S.Definition : S.CanonicalDeclaration; + Start.line = CD.Start.line(); + Start.character = CD.Start.column(); nit: could we directly

[PATCH] D63009: [OpenMP] Add target task alloc function with device ID

2019-06-12 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea updated this revision to Diff 204294. gtbercea added a comment. - Add device ID if available. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63009/new/ https://reviews.llvm.org/D63009 Files: lib/CodeGen/CGOpenMPRuntime.cpp test/OpenMP/target_depend_c

[PATCH] D63062: [clang-format] Added New Style Rule: OnePerLineBitFieldDecl

2019-06-12 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. Nit: if you going for "OnePerLine" in the name rather than "Break" can you keep it consistent with `ConstructorInitializerAllOnOneLineOrOnePerLine` and put the type first and then the operation i.e. `BitFieldOnePerLine` (this will help keep all BitField options

[PATCH] D60974: Clang IFSO driver action.

2019-06-12 Thread Puyan Lotfi via Phabricator via cfe-commits
plotfi updated this revision to Diff 204308. plotfi marked 2 inline comments as done. plotfi added a comment. Improving support for visibility correctness with classes, methods and inheritance. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60974/ne

[PATCH] D62977: [clang-tidy]: Google: new check 'google-upgrade-googletest-case'

2019-06-12 Thread Alex Strelnikov via Phabricator via cfe-commits
astrelni updated this revision to Diff 204312. astrelni added a comment. Style updates. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62977/new/ https://reviews.llvm.org/D62977 Files: clang-tools-extra/clang-tidy/google/UpgradeGoogletestCaseCheck.cpp clang-tools-extra/clang-tidy/go

[PATCH] D62977: [clang-tidy]: Google: new check 'google-upgrade-googletest-case'

2019-06-12 Thread Alex Strelnikov via Phabricator via cfe-commits
astrelni updated this revision to Diff 204313. astrelni marked 2 inline comments as done. astrelni added a comment. Fix space. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62977/new/ https://reviews.llvm.org/D62977 Files: clang-tools-extra/docs/clang-tidy/checks/google-upgrade-googl

[PATCH] D62977: [clang-tidy]: Google: new check 'google-upgrade-googletest-case'

2019-06-12 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. You need to upload the entire patch, not as compared to the previous patch. Without seeing the tests - what version checks does this have? It shouldn't fire if the googletest version is the one before that rename. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D

[PATCH] D62977: [clang-tidy]: Google: new check 'google-upgrade-googletest-case'

2019-06-12 Thread Alex Strelnikov via Phabricator via cfe-commits
astrelni marked an inline comment as done. astrelni added a comment. In D62977#1533384 , @Eugene.Zelenko wrote: > I think will be good idea to replace //upgrade// with //modernize// to be > consistent with similar checks in other module. I will work on

[PATCH] D60974: Clang IFSO driver action.

2019-06-12 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd added inline comments. Comment at: clang/lib/Frontend/CompilerInvocation.cpp:1690 + std::make_pair(frontend::GenerateInterfaceTBEExpV1, false)); + if (!ProgramActionPair.second) +Diags.Report(diag::err_drv_invalid_value) I t

[PATCH] D33841: [clang-tidy] redundant 'extern' keyword check

2019-06-12 Thread Daniel Kolozsvari via Phabricator via cfe-commits
koldaniel marked an inline comment as done. koldaniel added inline comments. Comment at: clang-tidy/readability/RedundantExternCheck.cpp:30 + + if (FD->getStorageClass() != SC_Extern) +return; lebedev.ri wrote: > Can you do that in `registerMatchers()`? The

[PATCH] D62977: [clang-tidy]: Google: new check 'google-upgrade-googletest-case'

2019-06-12 Thread Alex Strelnikov via Phabricator via cfe-commits
astrelni updated this revision to Diff 204317. astrelni added a comment. Fix mistake not uploading full diff CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62977/new/ https://reviews.llvm.org/D62977 Files: clang-tools-extra/clang-tidy/google/CMakeLists.txt clang-tools-extra/clang-ti

[PATCH] D62977: [clang-tidy]: Google: new check 'google-upgrade-googletest-case'

2019-06-12 Thread Alex Strelnikov via Phabricator via cfe-commits
astrelni updated this revision to Diff 204318. astrelni added a comment. Fix diff issues again CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62977/new/ https://reviews.llvm.org/D62977 Files: clang-tools-extra/clang-tidy/google/CMakeLists.txt clang-tools-extra/clang-tidy/google/Goog

[PATCH] D63221: Fixed clangd diagnostics priority

2019-06-12 Thread Shaurya Gupta via Phabricator via cfe-commits
SureYeaah created this revision. Herald added subscribers: cfe-commits, kadircet, arphaman, jkorous, MaskRay, ilya-biryukov. Herald added a project: clang. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D63221 Files: clang-tools-extra/clangd/Diagnostics.cpp clang-tools-extra

[PATCH] D33841: [clang-tidy] redundant 'extern' keyword check

2019-06-12 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added inline comments. Comment at: clang-tidy/readability/RedundantExternCheck.cpp:43-44 + + if (FD->getBeginLoc().isMacroID()) +return; + koldaniel wrote: > lebedev.ri wrote: > > Similarly, do this in `registerMatchers()` > Could you please help

[PATCH] D63009: [OpenMP] Add target task alloc function with device ID

2019-06-12 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea updated this revision to Diff 204320. gtbercea added a comment. - Fix tests. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63009/new/ https://reviews.llvm.org/D63009 Files: lib/CodeGen/CGOpenMPRuntime.cpp test/OpenMP/target_depend_codegen.cpp test

[PATCH] D63222: [Clangd] Fixed clangd diagnostics priority

2019-06-12 Thread Shaurya Gupta via Phabricator via cfe-commits
SureYeaah created this revision. SureYeaah added reviewers: sammccall, kadircet. Herald added subscribers: cfe-commits, arphaman, jkorous, MaskRay, ilya-biryukov. Herald added a project: clang. - Fixed diagnostics where zero width inserted ranges were being used instead of the whole token - Ad

[PATCH] D63009: [OpenMP] Add target task alloc function with device ID

2019-06-12 Thread Alexandre Eichenberger via Phabricator via cfe-commits
AlexEichenberger accepted this revision. AlexEichenberger added a comment. This revision is now accepted and ready to land. LGTM Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63009/new/ https://reviews.llvm.org/D63009 __

Re: [PATCH] D6833: Clang-format: Braces Indent Style Whitesmith

2019-06-12 Thread JVApen via cfe-commits
Hello Tim, I am no longer working on this. I've spent my time convincing my colleagues that clang-format is useful enough to change our braces, with success. I remember also being stuck on the enumerations. Good luck! On Wed, Jun 12, 2019, 04:16 Tim Wojtulewicz via Phabricator < revi...@reviews.

[PATCH] D62926: [analyzer] ReturnVisitor: Bypass everything to see inlined calls

2019-06-12 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso updated this revision to Diff 204331. Charusso marked an inline comment as done. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62926/new/ https://reviews.llvm.org/D62926 Files: clang/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp clang/test/Analysis/inlining/placement-new-f

[PATCH] D61989: [clang-tidy] enable modernize-concat-nested-namespaces on header files

2019-06-12 Thread Xiao Shi via Phabricator via cfe-commits
shixiao added a comment. Ping =) @JonasToth Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61989/new/ https://reviews.llvm.org/D61989 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://list

[PATCH] D62988: Add an attribute to allow fields of non-trivial types in C unions

2019-06-12 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. In D62988#1539230 , @ahatanak wrote: > In D62988#1538577 , @rsmith wrote: > > > How do you write correct (non-leaking, non-double-freeing, > > non-releasing-invalid-pointers) code with this

[PATCH] D62888: [NewPM] Port Sancov

2019-06-12 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added a comment. In D62888#1537233 , @chandlerc wrote: > I would just change this to have the module pass loop over the functions -- > that seems like it'll be much cleaner. > > As it is, I'm not seeing where the loop actually happens. But rat

[PATCH] D62926: [analyzer] ReturnVisitor: Bypass everything to see inlined calls

2019-06-12 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso added a comment. In D62926#1539191 , @NoQ wrote: > All right, it seems that i'm completely misunderstanding this problem and > we've been talking past each other this whole time. > > The problem is not that we need to skip the `CXXConstructExpr`.

[PATCH] D62888: [NewPM] Port Sancov

2019-06-12 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 204333. leonardchan edited the summary of this revision. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62888/new/ https://reviews.llvm.org/D62888 Files: clang/lib/CodeGen/BackendUtil.cpp clang/test/CodeG

r363187 - [analyzer] ProgramPoint: more explicit printJson()

2019-06-12 Thread Csaba Dabis via cfe-commits
Author: charusso Date: Wed Jun 12 11:24:02 2019 New Revision: 363187 URL: http://llvm.org/viewvc/llvm-project?rev=363187&view=rev Log: [analyzer] ProgramPoint: more explicit printJson() Summary: Now we print out every possible kinds of ProgramPoints. Reviewers: NoQ, xazax.hun, ravikandhadai, bal

[PATCH] D62946: [analyzer] ProgramPoint: more explicit printJson()

2019-06-12 Thread Csaba Dabis via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL363187: [analyzer] ProgramPoint: more explicit printJson() (authored by Charusso, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit: https://

[PATCH] D62988: Add an attribute to allow fields of non-trivial types in C unions

2019-06-12 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. For ARC, you could bzero the union member; this is what how we tell people to initialize malloc'ed memory as well, since there's no default-constructor concept that they can invoke for such cases. Our immediate need for this attribute is that we have some code that wan

r363188 - PR42220: take into account the possibility of aggregates with base

2019-06-12 Thread Richard Smith via cfe-commits
Author: rsmith Date: Wed Jun 12 11:32:22 2019 New Revision: 363188 URL: http://llvm.org/viewvc/llvm-project?rev=363188&view=rev Log: PR42220: take into account the possibility of aggregates with base classes when checking an InitListExpr for lifetime extension. Modified: cfe/trunk/lib/Sema/Se

[PATCH] D63157: C++ DR712 and others: handle non-odr-use resulting from an lvalue-to-rvalue conversion applied to a member access or similar not-quite-trivial lvalue expression.

2019-06-12 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: lib/CodeGen/CGExpr.cpp:1429 +/// for instance if a block or lambda or a member of a local class uses a +/// const int variable or constexpr variable from an enclosing function. CodeGenFunction::ConstantEmission Isn't t

r363191 - [MS] Pretend constexpr variable template specializations are inline

2019-06-12 Thread Reid Kleckner via cfe-commits
Author: rnk Date: Wed Jun 12 11:53:49 2019 New Revision: 363191 URL: http://llvm.org/viewvc/llvm-project?rev=363191&view=rev Log: [MS] Pretend constexpr variable template specializations are inline Fixes link errors with clang and the latest Visual C++ 14.21.27702 headers, which was reported as P

[PATCH] D63175: [MS] Pretend constexpr variable template specializations are inline

2019-06-12 Thread Reid Kleckner via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL363191: [MS] Pretend constexpr variable template specializations are inline (authored by rnk, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit

[PATCH] D63062: [clang-format] Added New Style Rule: BitFieldDeclarationsOnePerLine

2019-06-12 Thread Manikishan Ghantasala via Phabricator via cfe-commits
Manikishan updated this revision to Diff 204340. Manikishan marked 4 inline comments as done and 2 inline comments as done. Manikishan retitled this revision from "[clang-format] Added New Style Rule: OnePerLineBitFieldDecl" to "[clang-format] Added New Style Rule: BitFieldDeclarationsOnePerLine

[PATCH] D59673: [Clang] Harmonize Split DWARF options with llc

2019-06-12 Thread Aaron Puchert via Phabricator via cfe-commits
aaronpuchert added inline comments. Comment at: lib/CodeGen/BackendUtil.cpp:1345 Conf.RemarksPasses = CGOpts.OptRecordPasses; - Conf.DwoPath = CGOpts.SplitDwarfFile; + Conf.DwoPath = CGOpts.SplitDwarfOutput; switch (Action) { tejohnson wrote: > aaronpuche

[PATCH] D62988: Add an attribute to allow fields of non-trivial types in C unions

2019-06-12 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. In D62988#1540359 , @rjmccall wrote: > For ARC, you could bzero the union member; this is what how we tell people to > initialize malloc'ed memory as well, since there's no default-constructor > concept that they can invoke for su

r363195 - Add comment to r363191 code as requested in code review

2019-06-12 Thread Reid Kleckner via cfe-commits
Author: rnk Date: Wed Jun 12 12:50:06 2019 New Revision: 363195 URL: http://llvm.org/viewvc/llvm-project?rev=363195&view=rev Log: Add comment to r363191 code as requested in code review Modified: cfe/trunk/lib/AST/ASTContext.cpp Modified: cfe/trunk/lib/AST/ASTContext.cpp URL: http://llvm.or

[PATCH] D63175: [MS] Pretend constexpr variable template specializations are inline

2019-06-12 Thread Reid Kleckner via Phabricator via cfe-commits
rnk marked an inline comment as done. rnk added inline comments. Comment at: clang/lib/AST/ASTContext.cpp:9809 + // variable template specializations inline. + if (isa(VD) && VD->isConstexpr()) +return GVA_DiscardableODR; rsmith wrote: > It'd be

[PATCH] D59673: [Clang] Harmonize Split DWARF options with llc

2019-06-12 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson added inline comments. Comment at: lib/CodeGen/BackendUtil.cpp:1345 Conf.RemarksPasses = CGOpts.OptRecordPasses; - Conf.DwoPath = CGOpts.SplitDwarfFile; + Conf.DwoPath = CGOpts.SplitDwarfOutput; switch (Action) { aaronpuchert wrote: > tejohnson

[PATCH] D59673: [Clang] Harmonize Split DWARF options with llc

2019-06-12 Thread Aaron Puchert via Phabricator via cfe-commits
aaronpuchert added inline comments. Comment at: lib/CodeGen/BackendUtil.cpp:1345 Conf.RemarksPasses = CGOpts.OptRecordPasses; - Conf.DwoPath = CGOpts.SplitDwarfFile; + Conf.DwoPath = CGOpts.SplitDwarfOutput; switch (Action) { tejohnson wrote: > aaronpuche

r363199 - [test] Reinstate the assignment to the diagnostic log in the unittest

2019-06-12 Thread Alex Lorenz via cfe-commits
Author: arphaman Date: Wed Jun 12 13:35:44 2019 New Revision: 363199 URL: http://llvm.org/viewvc/llvm-project?rev=363199&view=rev Log: [test] Reinstate the assignment to the diagnostic log in the unittest from r363009 The diagnostic log is now set to "-" which forces it to use STDERR instead of t

Re: r363009 - [Frontend] SetUpDiagnosticLog should handle unowned diagnostic consumer

2019-06-12 Thread Alex L via cfe-commits
Thanks, that sounds good to me. I added the assignment with the new comment in 363199. On Wed, 12 Jun 2019 at 03:59, Ilya Biryukov wrote: > Sure, that should work just fine. Could you also add a comment what events > setting the log file sets in motion? It is not obvious from the test code. > >

[PATCH] D63222: [Clangd] Fixed clangd diagnostics priority

2019-06-12 Thread Shaurya Gupta via Phabricator via cfe-commits
SureYeaah updated this revision to Diff 204351. SureYeaah added a comment. Remove extra newline Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63222/new/ https://reviews.llvm.org/D63222 Files: clang-tools-extra/clangd/Diagnostics.cpp clang-tools

[PATCH] D63227: [analyzer] Better timers.

2019-06-12 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ created this revision. NoQ added reviewers: dcoughlin, xazax.hun, a_sidorin, rnkovacs, Szelethus, baloghadamsoftware, Charusso. Herald added subscribers: cfe-commits, dkrupp, donat.nagy, mikhail.ramalho, a.sidorin, szepet. Herald added a project: clang. `-analyzer-stats` now allows you to fi

r363204 - [clang-scan-deps] initial outline of the tool that runs preprocessor to find

2019-06-12 Thread Alex Lorenz via cfe-commits
Author: arphaman Date: Wed Jun 12 14:32:49 2019 New Revision: 363204 URL: http://llvm.org/viewvc/llvm-project?rev=363204&view=rev Log: [clang-scan-deps] initial outline of the tool that runs preprocessor to find dependencies over a JSON compilation database This commit introduces an outline for t

[PATCH] D60233: [clang-scan-deps] initial outline of the tool that runs preprocessor to find dependencies over a JSON compilation database

2019-06-12 Thread Alex Lorenz via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL363204: [clang-scan-deps] initial outline of the tool that runs preprocessor to find (authored by arphaman, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed p

r363205 - NFC, fixup indentation in CMakeLists.txt from r363204 as requested

2019-06-12 Thread Alex Lorenz via cfe-commits
Author: arphaman Date: Wed Jun 12 14:37:32 2019 New Revision: 363205 URL: http://llvm.org/viewvc/llvm-project?rev=363205&view=rev Log: NFC, fixup indentation in CMakeLists.txt from r363204 as requested in the review. I missed that review comment from https://reviews.llvm.org/D60233 in the origin

[PATCH] D60233: [clang-scan-deps] initial outline of the tool that runs preprocessor to find dependencies over a JSON compilation database

2019-06-12 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman marked 2 inline comments as done. arphaman added inline comments. Comment at: clang/test/ClangScanDeps/Inputs/regular_cdb.json:4 + "directory": "DIR", + "command": "clang -c DIR/regular_cdb.cpp -IInputs -MD -MF DIR/regular_cdb.d", + "file": "DIR/regular_cdb.cpp" -

r363207 - NFC, Update the ClangScanDeps.cpp file's license comment

2019-06-12 Thread Alex Lorenz via cfe-commits
Author: arphaman Date: Wed Jun 12 14:45:28 2019 New Revision: 363207 URL: http://llvm.org/viewvc/llvm-project?rev=363207&view=rev Log: NFC, Update the ClangScanDeps.cpp file's license comment The file ClangScanDeps.cpp from r363204 had the old outdated LLVM license comment at the top of the file

Re: r363204 - [clang-scan-deps] initial outline of the tool that runs preprocessor to find

2019-06-12 Thread Alex L via cfe-commits
On Wed, 12 Jun 2019 at 14:29, Alex Lorenz via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Author: arphaman > Date: Wed Jun 12 14:32:49 2019 > New Revision: 363204 > > URL: http://llvm.org/viewvc/llvm-project?rev=363204&view=rev > Log: > [clang-scan-deps] initial outline of the tool that run

r363208 - [clang-scan-deps] Include in ClangScanDeps.cpp to ensure it

2019-06-12 Thread Alex Lorenz via cfe-commits
Author: arphaman Date: Wed Jun 12 14:52:36 2019 New Revision: 363208 URL: http://llvm.org/viewvc/llvm-project?rev=363208&view=rev Log: [clang-scan-deps] Include in ClangScanDeps.cpp to ensure it builds on all platforms Modified: cfe/trunk/tools/clang-scan-deps/ClangScanDeps.cpp Modified: cf

[PATCH] D63161: Devirtualize destructor of final class.

2019-06-12 Thread Hiroshi Yamauchi via Phabricator via cfe-commits
yamauchi updated this revision to Diff 204365. yamauchi added a comment. Using getDevirtualizedMethod. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63161/new/ https://reviews.llvm.org/D63161 Files: lib/CodeGen/CGExprCXX.cpp test/CodeGenCXX/devirtualize-dtor

[PATCH] D63161: Devirtualize destructor of final class.

2019-06-12 Thread Hiroshi Yamauchi via Phabricator via cfe-commits
yamauchi marked 2 inline comments as done. yamauchi added inline comments. Comment at: lib/CodeGen/CGExprCXX.cpp:1867-1868 - if (Dtor->isVirtual()) { + if (Dtor->isVirtual() && + !(Dtor->hasAttr() || RD->hasAttr())) { CGF.CGM.getCXXABI().emitVirtualO

[PATCH] D62988: Add an attribute to allow fields of non-trivial types in C unions

2019-06-12 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added a comment. John and I had a discussion offline and decided that we should not pursue the approach taken in this patch. I'll try to work on a patch that follows the C++11 approach when I have time later. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org

r363220 - Revert r361811: 'Re-commit r357452 (take 2): "SimplifyCFG SinkCommonCodeFromPredecessors ...'

2019-06-12 Thread David L. Jones via cfe-commits
Author: dlj Date: Wed Jun 12 19:04:45 2019 New Revision: 363220 URL: http://llvm.org/viewvc/llvm-project?rev=363220&view=rev Log: Revert r361811: 'Re-commit r357452 (take 2): "SimplifyCFG SinkCommonCodeFromPredecessors ...' We have observed some failures with internal builds with this revision.

[PATCH] D63164: [HIP] Add option to force lambda nameing following ODR in HIP/CUDA.

2019-06-12 Thread Michael Liao via Phabricator via cfe-commits
hliao added a comment. ping for comment as one of HIP-based workload is blocked by this issue Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63164/new/ https://reviews.llvm.org/D63164 ___ cfe-commits ma

[PATCH] D62839: [clangd] Index API and implementations for relations

2019-06-12 Thread Nathan Ridge via Phabricator via cfe-commits
nridge marked an inline comment as done. nridge added inline comments. Comment at: clang-tools-extra/clangd/index/Index.h:77 +struct RelationsRequest { + SymbolID Subject; + index::SymbolRole Predicate; kadircet wrote: > sorry for missing it in previous iterati

[PATCH] D62888: [NewPM] Port Sancov

2019-06-12 Thread Chandler Carruth via Phabricator via cfe-commits
chandlerc requested changes to this revision. chandlerc added a comment. This revision now requires changes to proceed. This was a lot easier for me to understand too, thanks. Somewhat minor code changes below. Comment at: clang/lib/CodeGen/BackendUtil.cpp:1231-1232 + MPM

  1   2   >