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

2018-11-30 Thread Bevin Hansson via Phabricator via cfe-commits
ebevhan added inline comments. Comment at: clang/lib/Sema/SemaExpr.cpp:1304 +RHSTy = ResultTy; + } + rjmccall wrote: > Hmm. So adding a signed integer to an unsigned fixed-point type always > converts the integer to unsigned? That's a little weird, but on

[PATCH] D55065: [clangd] Drop injected class name when class scope is not explicitly specified.

2018-11-30 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet accepted this revision. kadircet added a comment. This revision is now accepted and ready to land. LGTM, thanks! Comment at: unittests/clangd/CodeCompleteTests.cpp:419 +TEST(CompletionTest, SkipInjectedWhenUnqualified) { + EXPECT_THAT(completions("struct X { void f(

[PATCH] D55065: [clangd] Drop injected class name when class scope is not explicitly specified.

2018-11-30 Thread Eric Liu via Phabricator via cfe-commits
ioeric marked an inline comment as done. ioeric added inline comments. Comment at: unittests/clangd/CodeCompleteTests.cpp:419 +TEST(CompletionTest, SkipInjectedWhenUnqualified) { + EXPECT_THAT(completions("struct X { void f() { X^ }};").Completions, kadircet w

[PATCH] D55065: [clangd] Drop injected class name when class scope is not explicitly specified.

2018-11-30 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: unittests/clangd/CodeCompleteTests.cpp:419 +TEST(CompletionTest, SkipInjectedWhenUnqualified) { + EXPECT_THAT(completions("struct X { void f() { X^ }};").Completions, ioeric wrote: > kadircet wrote: > > Could you als

[clang-tools-extra] r347968 - [clangd] Fix junk output in clangd vscode plugin

2018-11-30 Thread Haojian Wu via cfe-commits
Author: hokein Date: Fri Nov 30 01:14:52 2018 New Revision: 347968 URL: http://llvm.org/viewvc/llvm-project?rev=347968&view=rev Log: [clangd] Fix junk output in clangd vscode plugin Summary: When using the vscode clangd plugin, lots and lots of junk output is printed to the output window, which

[PATCH] D55052: Fix junk output in clangd vscode plugin

2018-11-30 Thread Haojian Wu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL347968: [clangd] Fix junk output in clangd vscode plugin (authored by hokein, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.llvm.org/D55052?vs=175897&

[clang-tools-extra] r347969 - [clangd] Bump vscode-clangd v0.0.8

2018-11-30 Thread Haojian Wu via cfe-commits
Author: hokein Date: Fri Nov 30 01:18:31 2018 New Revision: 347969 URL: http://llvm.org/viewvc/llvm-project?rev=347969&view=rev Log: [clangd] Bump vscode-clangd v0.0.8 Modified: clang-tools-extra/trunk/clangd/clients/clangd-vscode/package.json Modified: clang-tools-extra/trunk/clangd/clients

r347970 - Fix a use-after-scope bug.

2018-11-30 Thread Haojian Wu via cfe-commits
Author: hokein Date: Fri Nov 30 01:23:01 2018 New Revision: 347970 URL: http://llvm.org/viewvc/llvm-project?rev=347970&view=rev Log: Fix a use-after-scope bug. Modified: cfe/trunk/lib/StaticAnalyzer/Checkers/RetainCountChecker/RetainCountDiagnostics.cpp Modified: cfe/trunk/lib/StaticAnalyz

[PATCH] D55052: Fix junk output in clangd vscode plugin

2018-11-30 Thread Haojian Wu via Phabricator via cfe-commits
hokein added a comment. > Yeah, there are still modes where clangd behaves badly there. Note that the > output from that pane is rarely useful anyway as clangd keeps producing > errors about accessing non-open files, which would confuse people even more. > Overall we never designed this output

[PATCH] D54995: [MemoryBuffer] By default assume that all files are volatile to prevent unintended file locks

2018-11-30 Thread Ivan Donchevskii via Phabricator via cfe-commits
yvvan added a comment. No success with unmapping. Buffers are hold by PCMCache in Preprocessor (and the same one in ASTReader) and if I clean them then SourceManger crashed sooner or later on some call that gets data from external files. So far I have no steps to reproduce the lock on user file

[PATCH] D54905: [AddressSanitizer] Add flag to disable linking with CXX runtime

2018-11-30 Thread Eugene Leviant via Phabricator via cfe-commits
evgeny777 added a comment. > How do you do this now? Sometimes with this patch, sometimes simply issuing linker command line manually > Is that related to https://github.com/google/sanitizers/issues/295 ? I don't think so. I'm experiencing link error, not C++ standard discrepancy. > Would turn

[PATCH] D55061: [clangd] Penalize destructor and overloaded operators in code completion.

2018-11-30 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/Quality.h:74 Keyword, +Operator, } Category = Unknown; Maybe name it `OverloadedOperator` to avoid confusion with other no

[PATCH] D54999: [clangd] Populate include graph during static indexing action.

2018-11-30 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Comment at: unittests/clangd/IndexActionTests.cpp:168 + std::string MainFilePath = testPath("main.cpp"); + std::pair CommonHeader = {testPath("common.h"), + R"cpp( kadirce

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

2018-11-30 Thread Mikael Nilsson via Phabricator via cfe-commits
mikael updated this revision to Diff 176063. Herald added subscribers: arphaman, eraman. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D54862/new/ https://reviews.llvm.org/D54862 Files: include/clang/AST/DeclCXX.h include/clang/AST/Type.h lib/AST/DeclCXX.cpp lib/AST/ItaniumMangle.

[PATCH] D55051: [Analyzer] [HOTFIX!] SValBuilder crash when `aggressive-binary-operation-simplification` enabled

2018-11-30 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware updated this revision to Diff 176064. baloghadamsoftware added a comment. Test added. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55051/new/ https://reviews.llvm.org/D55051 Files: lib/StaticAnalyzer/Core/SimpleSValBuilder.cpp test/Analysis/svalbuilder-rearrange

[PATCH] D55054: [clang] Fill RealPathName for virtual files.

2018-11-30 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Comment at: include/clang/Basic/FileManager.h:177 + /// Fills the RealPathName entry in UFE by converting the given filename to an + /// absolute path, returns true if FileName was modified. + bool fillRealPathName(FileEntry *UFE, llvm::St

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

2018-11-30 Thread Mikael Nilsson via Phabricator via cfe-commits
mikael marked an inline comment as done. mikael added inline comments. Comment at: lib/Sema/SemaOverload.cpp:5254 + if (!Context.hasSameType(From->getType(), DestType)) { +if (From->getType().getAddressSpace() != DestType.getAddressSpace()) + From = ImpCastExprToType(Fr

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

2018-11-30 Thread Donát Nagy via Phabricator via cfe-commits
donat.nagy updated this revision to Diff 176066. donat.nagy added a comment. Handle ternary operators, improve documentation Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D54757/new/ https://reviews.llvm.org/D54757 Files: clang-tidy/bugprone/Branc

[PATCH] D54999: [clangd] Populate include graph during static indexing action.

2018-11-30 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 176065. kadircet marked 4 inline comments as done. kadircet added a comment. - Address comments. Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D54999/new/ https://reviews.llvm.org/D54999 Files: clangd/Headers

r347981 - lyzer] [HOTFIX!] SValBuilder crash when `aggressive-binary-operation-simplification` enabled

2018-11-30 Thread Adam Balogh via cfe-commits
Author: baloghadamsoftware Date: Fri Nov 30 02:37:44 2018 New Revision: 347981 URL: http://llvm.org/viewvc/llvm-project?rev=347981&view=rev Log: lyzer] [HOTFIX!] SValBuilder crash when `aggressive-binary-operation-simplification` enabled During the review of D41938 a condition check with an earl

[PATCH] D55051: [Analyzer] [HOTFIX!] SValBuilder crash when `aggressive-binary-operation-simplification` enabled

2018-11-30 Thread Balogh , Ádám via Phabricator via cfe-commits
This revision was not accepted when it landed; it landed in state "Needs Review". This revision was automatically updated to reflect the committed changes. Closed by commit rC347981: lyzer] [HOTFIX!] SValBuilder crash when `aggressive-binary-operation… (authored by baloghadamsoftware, committed b

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

2018-11-30 Thread Donát Nagy via Phabricator via cfe-commits
donat.nagy marked 8 inline comments as done. donat.nagy added a comment. At the end of the documentation I stated that the check examines the code after macro expansion. Is this note clear enough? Comment at: test/clang-tidy/bugprone-branch-clone.cpp:4 +void test_basic1(int in

[PATCH] D55062: [clangd] Partition include graph on auto-index.

2018-11-30 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Comment at: clangd/index/Background.cpp:184 +// We keep only the node "Path" and its edges. +IncludeGraph getSubGraph(llvm::StringRef Path, const IncludeGraph &FullGraph) { + IncludeGraph IG; We should make the function stati

[PATCH] D55051: [Analyzer] [HOTFIX!] SValBuilder crash when `aggressive-binary-operation-simplification` enabled

2018-11-30 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware added a comment. Committed because I was notified that the deadline for 7.0.1 is today. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55051/new/ https://reviews.llvm.org/D55051 ___ cfe-commits mail

[PATCH] D55029: set default max-page-size to 4KB in lld for Android Aarch64

2018-11-30 Thread Peter Smith via Phabricator via cfe-commits
peter.smith added a comment. In D55029#1313120 , @ruiu wrote: > LGTM. Please commit. > > Peter, I wonder if you are fine with the default 64KiB page size with lld, > especially given that lld always round up the text segment size to the > maximum page si

[PATCH] D54796: [clangd] C++ API for emitting file status

2018-11-30 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. > @ilya-biryukov, I hope the current patch is not too big for you to review, > happy to chat offline if you want (sam and I had a lot of discussions before > he is OOO). Picking it up. Mostly NITs from my side and a few questions to better understand the design.

[clang-tools-extra] r347982 - [clangd] Drop injected class name when class scope is not explicitly specified.

2018-11-30 Thread Eric Liu via cfe-commits
Author: ioeric Date: Fri Nov 30 03:12:40 2018 New Revision: 347982 URL: http://llvm.org/viewvc/llvm-project?rev=347982&view=rev Log: [clangd] Drop injected class name when class scope is not explicitly specified. Summary: E.g. allow injected "A::A" in `using A::A^` but not in "A^". Reviewers: ka

[PATCH] D55065: [clangd] Drop injected class name when class scope is not explicitly specified.

2018-11-30 Thread Eric Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL347982: [clangd] Drop injected class name when class scope is not explicitly specified. (authored by ioeric, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM CHANGES SINCE L

[PATCH] D55061: [clangd] Penalize destructor and overloaded operators in code completion.

2018-11-30 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 176075. ioeric marked an inline comment as done. ioeric added a comment. - Rename test name. Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55061/new/ https://reviews.llvm.org/D55061 Files: clangd/Quality.cpp

[PATCH] D55061: [clangd] Penalize destructor and overloaded operators in code completion.

2018-11-30 Thread Eric Liu via Phabricator via cfe-commits
ioeric added inline comments. Comment at: clangd/Quality.h:74 Keyword, +Operator, } Category = Unknown; hokein wrote: > Maybe name it `OverloadedOperator` to avoid confusion with other > non-overloaded operators like `?:` Ternary operator is not a sy

[clang-tools-extra] r347983 - [clangd] Penalize destructor and overloaded operators in code completion.

2018-11-30 Thread Eric Liu via cfe-commits
Author: ioeric Date: Fri Nov 30 03:17:15 2018 New Revision: 347983 URL: http://llvm.org/viewvc/llvm-project?rev=347983&view=rev Log: [clangd] Penalize destructor and overloaded operators in code completion. Reviewers: hokein Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, cfe-c

[PATCH] D55061: [clangd] Penalize destructor and overloaded operators in code completion.

2018-11-30 Thread Eric Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rCTE347983: [clangd] Penalize destructor and overloaded operators in code completion. (authored by ioeric, committed by ). Changed prior to commit: https://reviews.llvm.org/D55061?vs=176075&id=176076#toc

[PATCH] D55054: [clang] Fill RealPathName for virtual files.

2018-11-30 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 176078. kadircet marked 5 inline comments as done. kadircet added a comment. Address comments Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55054/new/ https://reviews.llvm.org/D55054 Files: include/clang/Basic/FileManager

[PATCH] D55023: OpenCL: Improve vector printf warnings

2018-11-30 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia accepted this revision. Anastasia added a comment. This revision is now accepted and ready to land. LGTM! Thanks! Comment at: test/SemaOpenCL/printf-format-strings.cl:65 +{ +printf("%v4f\n", arg); // expected-warning {{format specifies type 'double __attribute__(

[PATCH] D54947: [OpenCL][CodeGen] Fix replacing memcpy with addrspacecast

2018-11-30 Thread Dmitry Sidorov via Phabricator via cfe-commits
sidorovd updated this revision to Diff 176085. sidorovd marked an inline comment as done. sidorovd added a comment. Removed redundant lines in a comment CHANGES SINCE LAST ACTION https://reviews.llvm.org/D54947/new/ https://reviews.llvm.org/D54947 Files: lib/CodeGen/CGCall.cpp test/CodeG

[PATCH] D54947: [OpenCL][CodeGen] Fix replacing memcpy with addrspacecast

2018-11-30 Thread Dmitry Sidorov via Phabricator via cfe-commits
sidorovd added inline comments. Comment at: lib/CodeGen/CGCall.cpp:3972 + // we don't want to perform address space cast for it, since that + // leads to casting __private * (default addr space in OpenCL) to + // __global * which is not valid. Create me

[PATCH] D55054: [clang] Fill RealPathName for virtual files.

2018-11-30 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: unittests/Basic/FileManagerTest.cpp:237 ASSERT_TRUE(file->isValid()); // "real path name" reveals whether the file was actually opened. EXPECT_EQ("", file->tryGetRealPathName()); ilya-biryukov wrote: > This tes

[PATCH] D55062: [clangd] Partition include graph on auto-index.

2018-11-30 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 176090. kadircet marked 7 inline comments as done. kadircet added a comment. - Address comments Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55062/new/ https://reviews.llvm.org/D55062 Files: clangd/index/Ba

[PATCH] D55062: [clangd] Partition include graph on auto-index.

2018-11-30 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: unittests/clangd/BackgroundIndexTests.cpp:192 +[&](llvm::StringRef) { return &MSS; }); +CDB.setCompileCommand(testPath("root"), Cmd); +ASSERT_TRUE(Idx.blockUntilIdleForTest()); ilya-biryu

[PATCH] D55070: Replace FullComment member being visited with parameter

2018-11-30 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. LGTM! Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55070/new/ https://reviews.llvm.org/D55070 ___

[PATCH] D55069: Extend the CommentVisitor with parameter types

2018-11-30 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D55069#1313591 , @steveire wrote: > The follow-up patch didn't build anymore with the `&&`. > > ../tools/clang/lib/AST/ASTDumper.cpp:2672:75: error: cannot bind rvalue > reference of type ‘const clang::comments::FullCom

[PATCH] D55083: Re-arrange content in FunctionDecl dump

2018-11-30 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. The summary explains what it's doing, but not why it's doing it -- why is this change in behavior needed? Does this not break any tests? Btw, as we work on this refactoring, I think a good approach will be to build up the base of tests around AST dumping so that w

[PATCH] D54796: [clangd] C++ API for emitting file status

2018-11-30 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 176098. hokein marked 11 inline comments as done. hokein added a comment. Fix nits. Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D54796/new/ https://reviews.llvm.org/D54796 Files: clangd/ClangdServer.cpp cla

[PATCH] D54796: [clangd] C++ API for emitting file status

2018-11-30 Thread Haojian Wu via Phabricator via cfe-commits
hokein added inline comments. Comment at: clangd/ClangdServer.h:49 + /// Called whenever the file status is updated. + virtual void onFileUpdated(PathRef File, const TUStatus &Status){}; }; ilya-biryukov wrote: > Have we thought about the way we might expose s

[PATCH] D55068: NFC: Simplify dumpStmt child handling

2018-11-30 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: lib/AST/ASTDumper.cpp:1987 +ConstStmtVisitor::Visit(S); + steveire wrote: > aaron.ballman wrote: > > Was there something special about calling the Visit methods directly and > > bailing out? Your code certai

r347987 - Fix warning about unused variable [NFC]

2018-11-30 Thread Mikael Holmen via cfe-commits
Author: uabelho Date: Fri Nov 30 05:38:33 2018 New Revision: 347987 URL: http://llvm.org/viewvc/llvm-project?rev=347987&view=rev Log: Fix warning about unused variable [NFC] Modified: cfe/trunk/lib/StaticAnalyzer/Checkers/RetainCountChecker/RetainCountDiagnostics.cpp Modified: cfe/trunk/li

[PATCH] D53708: [ASTImporter] Add importer specific lookup

2018-11-30 Thread Gabor Marton via Phabricator via cfe-commits
martong marked 8 inline comments as done. martong added inline comments. Comment at: lib/AST/ASTImporter.cpp:7658 +ASTImporter::FoundDeclsTy +ASTImporter::FindDeclsInToCtx(DeclContext *DC, DeclarationName Name) { + // We search in the redecl context because of transparent contex

[PATCH] D53708: [ASTImporter] Add importer specific lookup

2018-11-30 Thread Gabor Marton via Phabricator via cfe-commits
martong updated this revision to Diff 176100. martong marked 3 inline comments as done. martong added a comment. - Address Alexei's comments - Rename FindDeclsInToCtx to findDeclsInToCtx - Remove superfluous spaces from stringliterals - Remove unused header - Remove empty test - Return nullptr and

[PATCH] D55101: [clang-tidy] Ignore namespaced and C++ member functions in google-objc-function-naming check 🙈

2018-11-30 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! Comment at: test/clang-tidy/google-objc-function-naming.mm:24-25 + +class Baz { + public: +int value() { return 0; } Can you run thi

[PATCH] D53708: [ASTImporter] Add importer specific lookup

2018-11-30 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. Hey Alexei, Thank you again for your comments. I changed to code accordingly. Also, I recognized that we should use a `SmallSetVector` instead of a `SmallPtrSet`, because the latter results unpredictable iteration (pointers may have different values with each run). Tho

[PATCH] D54737: [clang-tidy] Add the abseil-duration-comparison check

2018-11-30 Thread Hyrum Wright via Phabricator via cfe-commits
hwright updated this revision to Diff 176103. hwright added a comment. Slightly simplify the fixit text CHANGES SINCE LAST ACTION https://reviews.llvm.org/D54737/new/ https://reviews.llvm.org/D54737 Files: clang-tidy/abseil/AbseilTidyModule.cpp clang-tidy/abseil/CMakeLists.txt clang-ti

[PATCH] D54796: [clangd] C++ API for emitting file status

2018-11-30 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Comment at: clangd/ClangdServer.h:49 + /// Called whenever the file status is updated. + virtual void onFileUpdated(PathRef File, const TUStatus &Status){}; }; hokein wrote: > ilya-biryukov wrote: > > Have we thought about

[PATCH] D55069: Extend the CommentVisitor with parameter types

2018-11-30 Thread Stephen Kelly via Phabricator via cfe-commits
steveire added a comment. > Huh, that's surprising. It's a perfect forwarding reference It's not a forwarding reference because the template parameter is from the record, not the function. See https://godbolt.org/z/L4N2aS > One of the reasons I think this may be important is with the JSON dump

[PATCH] D55069: Extend the CommentVisitor with parameter types

2018-11-30 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. In D55069#1314508 , @steveire wrote: > > Huh, that's surprising. It's a perfect forwarding reference > > It's not a forwarding reference b

[PATCH] D55121: Make several Python scripts portable across Python2 and Python 3

2018-11-30 Thread serge via Phabricator via cfe-commits
serge-sans-paille created this revision. serge-sans-paille added reviewers: ddunbar, djasper. Herald added subscribers: cfe-commits, kadircet, arphaman, whisperity. Mostly: - portability of print through from __future__ import print_function - xrange -> range - range(...) -> list(range(

[PATCH] D55121: Make several Python scripts portable across Python2 and Python 3

2018-11-30 Thread serge via Phabricator via cfe-commits
serge-sans-paille added a comment. Conversion using the ``futurize`` script, then manual review. For the sake of reviewer sanity, I've left all the difficult part to further separate commits. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55121/new/ https://revie

[PATCH] D55068: NFC: Simplify dumpStmt child handling

2018-11-30 Thread Stephen Kelly via Phabricator via cfe-commits
steveire marked an inline comment as done. steveire added inline comments. Comment at: lib/AST/ASTDumper.cpp:1987 +ConstStmtVisitor::Visit(S); + aaron.ballman wrote: > steveire wrote: > > aaron.ballman wrote: > > > Was there something special about calling

[PATCH] D55083: Re-arrange content in FunctionDecl dump

2018-11-30 Thread Stephen Kelly via Phabricator via cfe-commits
steveire added a comment. Yes, please commit your new tests for FunctionDecl dumping before this patch can go in. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55083/new/ https://reviews.llvm.org/D55083 ___ cfe-comm

[PATCH] D54903: [Sema] Improve static_assert diagnostics.

2018-11-30 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: lib/AST/NestedNameSpecifier.cpp:308-310 +if (ResolveTemplateArguments && getAsRecordDecl()) { + if (const auto *Record = + dyn_cast(getAsRecordDecl())) { I'd remove the `getAsRecordDecl()` fro

[PATCH] D55076: [analyzer] RetainCountChecker: recognize that OSObject can be created directly using an operator "new"

2018-11-30 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added inline comments. Comment at: clang/test/Analysis/osobject-retain-release.cpp:27 + + static void * operator new(unsigned long size); + NoQ wrote: > I think we should use `size_t` as much as possible, because this may > otherwise have weird consequences

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

2018-11-30 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: lib/Sema/SemaChecking.cpp:7598-7602 + if (ICE->getCastKind() == CK_IntegralCast && + From->isPromotableIntegerType() && + S.Context.getPromotedIntegerType(From) == To) +return true; + return false;

[PATCH] D54796: [clangd] C++ API for emitting file status

2018-11-30 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 176111. hokein marked 12 inline comments as done. hokein added a comment. Address comments and fix a bug in the test. Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D54796/new/ https://reviews.llvm.org/D54796 File

[PATCH] D54796: [clangd] C++ API for emitting file status

2018-11-30 Thread Haojian Wu via Phabricator via cfe-commits
hokein marked an inline comment as not done. hokein added inline comments. Comment at: clangd/ClangdServer.h:49 + /// Called whenever the file status is updated. + virtual void onFileUpdated(PathRef File, const TUStatus &Status){}; }; ilya-biryukov wrote: > ho

r347994 - Adding tests for -ast-dump; NFC.

2018-11-30 Thread Aaron Ballman via cfe-commits
Author: aaronballman Date: Fri Nov 30 06:43:21 2018 New Revision: 347994 URL: http://llvm.org/viewvc/llvm-project?rev=347994&view=rev Log: Adding tests for -ast-dump; NFC. This adds tests for the majority of the functionality around FunctionDecl and CXXMethodDecl. Added: cfe/trunk/test/Misc

[PATCH] D55083: Re-arrange content in FunctionDecl dump

2018-11-30 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D55083#1314546 , @steveire wrote: > Yes, please commit your new tests for FunctionDecl dumping before this patch > can go in. r347994 has those tests. Repository: rC Clang CHANGES SINCE LAST ACTION https://review

r347996 - Adding tests for -ast-dump; NFC.

2018-11-30 Thread Aaron Ballman via cfe-commits
Author: aaronballman Date: Fri Nov 30 07:11:16 2018 New Revision: 347996 URL: http://llvm.org/viewvc/llvm-project?rev=347996&view=rev Log: Adding tests for -ast-dump; NFC. This adds tests for DeclStmt and demonstrates that we don't create such an AST node for global declarations currently. Adde

[PATCH] D55124: [CodeComplete] Cleanup access checking in code completion

2018-11-30 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov created this revision. ilya-biryukov added a reviewer: ioeric. Also fixes a crash (see the added 'accessibility-crash.cpp' test). Repository: rC Clang https://reviews.llvm.org/D55124 Files: include/clang/Sema/Sema.h lib/Sema/CodeCompleteConsumer.cpp lib/Sema/SemaAccess.cp

[PATCH] D52879: Derive builtin return type from its definition

2018-11-30 Thread Bruno Ricci via Phabricator via cfe-commits
riccibruno added a comment. In D52879#1311177 , @riccibruno wrote: > And moreover I believe this change is subtly incorrect for the following > reason: > The type that is passed into the constructor of the call expression is the > type > of the call ex

[PATCH] D55054: [clang] Fill RealPathName for virtual files.

2018-11-30 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 and a few nits Comment at: include/clang/Basic/FileManager.h:108 + + // Only for use in tests to see if deferred opens are happening, arther than + // re

[PATCH] D54999: [clangd] Populate include graph during static indexing action.

2018-11-30 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. Thank, LGTM. A few NITs. Comment at: clangd/index/IndexAction.h:31 +std::function RefsCallback, +std::function IncludeGraphCallback = nullptr); --

[PATCH] D55121: Make several Python scripts portable across Python2 and Python 3

2018-11-30 Thread Michael Platings via Phabricator via cfe-commits
michaelplatings added a comment. In general LGTM, as someone who's done a 2-3 conversion of similar scale before. The only suggestion I'd make is to consider changing the `__future__` imports to `from __future__ import absolute_import, division, print_function` I found this gave the best consist

[PATCH] D55125: Fix a false positive in misc-redundant-expression check

2018-11-30 Thread Daniel Krupp via Phabricator via cfe-commits
dkrupp created this revision. dkrupp added reviewers: alexfh, aaron.ballman, gamesh411. dkrupp added a project: clang-tools-extra. Herald added subscribers: cfe-commits, Szelethus, rnkovacs. Do not warn for redundant conditional expressions when the true and false branches are expanded from differ

[PATCH] D52879: Derive builtin return type from its definition

2018-11-30 Thread Marco Antognini via Phabricator via cfe-commits
mantognini added a comment. In D52879#1311177 , @riccibruno wrote: > And moreover I believe this change is subtly incorrect for the following > reason: > The type that is passed into the constructor of the call expression is the > type > of the call ex

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

2018-11-30 Thread Bevin Hansson via Phabricator via cfe-commits
ebevhan updated this revision to Diff 176130. ebevhan added a comment. Rebased and addressed review comments. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D51211/new/ https://reviews.llvm.org/D51211 Files: lib/Sema/SemaChecking.cpp test/Sema/format-strings-bitfield-promotion.c In

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

2018-11-30 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia created this revision. Anastasia added a reviewer: rjmccall. Herald added a subscriber: yaxunl. Added new diagnostics when templates are instantiated with different address space from the one provided in definition. This also prevents deducing generic address space in pointer type of t

[PATCH] D55101: [clang-tidy] Ignore namespaced and C++ member functions in google-objc-function-naming check 🙈

2018-11-30 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton added a comment. IMHO we should just disable this check entirely for C++ files (including Objective-C++). Since Objective-C++ files will have a mix of the Google Objective-C and Google C++ styles, I think there will be too many places where we'll hit conflicts like this (there are

[PATCH] D55128: [CMake] Store path to vendor-specific headers in clang-headers target property

2018-11-30 Thread Stefan Gränitz via Phabricator via cfe-commits
sgraenitz created this revision. sgraenitz added reviewers: aprantl, JDevlieghere, davide, friss, dexonsmith. Herald added a subscriber: mgorny. LLDB.framework wants a copy these headers. With this change LLDB can easily glob for the list of files: get_target_property(clang_include_dir clang-h

[PATCH] D55129: [CTU] Eliminate race condition in CTU lit tests

2018-11-30 Thread Gabor Marton via Phabricator via cfe-commits
martong created this revision. martong added reviewers: xazax.hun, a_sidorin. Herald added subscribers: cfe-commits, gamesh411, Szelethus, dkrupp, rnkovacs. We plan to introduce additional CTU related lit test. Since lit may run the tests in parallel, it is not safe to use the same directory (%T)

[PATCH] D55128: [CMake] Store path to vendor-specific headers in clang-headers target property

2018-11-30 Thread Jonas Devlieghere via Phabricator via cfe-commits
JDevlieghere accepted this revision. JDevlieghere added a comment. This revision is now accepted and ready to land. This makes sense to me. I'm don't know if there's a better property but I think this matches the intended use, so I think it is fine. Repository: rC Clang CHANGES SINCE LAST AC

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

2018-11-30 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added a comment. LGTM, could you please run this check over real world code and check that there are no obvious false positives? Comment at: docs/clang-tidy/checks/bugprone-branch-clone.rst:10 + + .. code-block:: c++ + please do not indent the `.. c

[PATCH] D55125: [clang-tidy] Fix a false positive in misc-redundant-expression check

2018-11-30 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus added a comment. @JonasToth this is the `Lexer` based expression equality check I talked about in D54757#1311516 . The point of this patch is that the definition is a macro sure could be build dependent, but the macro name is not, so it wouldn

[PATCH] D54737: [clang-tidy] Add the abseil-duration-comparison check

2018-11-30 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth accepted this revision. JonasToth added a comment. This revision is now accepted and ready to land. Only the test and your opinion on the `Optional` thing, If you want to keep it that way its fine. LGTM afterwards :) Comment at: clang-tidy/abseil/DurationFactoryFloa

[PATCH] D53153: [OpenCL] Mark kernel functions with default visibility

2018-11-30 Thread Scott Linder via Phabricator via cfe-commits
scott.linder added a comment. In D53153#1291348 , @rjmccall wrote: > In D53153#1289380 , @scott.linder > wrote: > > > I don't believe that is currently the case (the unrestricted linking of OCL > > code to OCL cod

[PATCH] D55125: [clang-tidy] Fix a false positive in misc-redundant-expression check

2018-11-30 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added a comment. In D55125#1314741 , @Szelethus wrote: > @JonasToth this is the `Lexer` based expression equality check I talked about > in D54757#1311516 . The point of > this patch is that the definit

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

2018-11-30 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: clang/lib/Sema/SemaExpr.cpp:1304 +RHSTy = ResultTy; + } + ebevhan wrote: > rjmccall wrote: > > Hmm. So adding a signed integer to an unsigned fixed-point type always > > converts the integer to unsigned? That's

[PATCH] D53153: [OpenCL] Mark kernel functions with default visibility

2018-11-30 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. In D53153#1314777 , @scott.linder wrote: > In D53153#1291348 , @rjmccall wrote: > > > In D53153#1289380 , @scott.linder > > wrote: > > > > > I don

[PATCH] D55121: Make several Python scripts portable across Python2 and Python 3

2018-11-30 Thread serge via Phabricator via cfe-commits
serge-sans-paille updated this revision to Diff 176141. serge-sans-paille added a comment. Use generic ``from __future__ import `` line whenever it makes sense CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55121/new/ https://reviews.llvm.org/D55121 Files: bindings/python/clang/cindex

[PATCH] D52879: Derive builtin return type from its definition

2018-11-30 Thread Bruno Ricci via Phabricator via cfe-commits
riccibruno added a comment. In D52879#1314694 , @mantognini wrote: > In D52879#1311177 , @riccibruno > wrote: > > > And moreover I believe this change is subtly incorrect for the following > > reason: > > The typ

[clang-tools-extra] r348005 - [clangd] Populate include graph during static indexing action.

2018-11-30 Thread Kadir Cetinkaya via cfe-commits
Author: kadircet Date: Fri Nov 30 08:59:00 2018 New Revision: 348005 URL: http://llvm.org/viewvc/llvm-project?rev=348005&view=rev Log: [clangd] Populate include graph during static indexing action. Summary: This is the second part for introducing include hierarchy into index files produced by cla

[PATCH] D54999: [clangd] Populate include graph during static indexing action.

2018-11-30 Thread Kadir Cetinkaya via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL348005: [clangd] Populate include graph during static indexing action. (authored by kadircet, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM CHANGES SINCE LAST ACTION ht

[PATCH] D54999: [clangd] Populate include graph during static indexing action.

2018-11-30 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 176144. kadircet marked 2 inline comments as done. kadircet added a comment. - Address comments Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D54999/new/ https://reviews.llvm.org/D54999 Files: clangd/Headers.

[PATCH] D55054: [clang] Fill RealPathName for virtual files.

2018-11-30 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 176146. kadircet marked 5 inline comments as done. kadircet added a comment. - Address comments Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55054/new/ https://reviews.llvm.org/D55054 Files: include/clang/Basic/FileManag

[PATCH] D55054: [clang] Fill RealPathName for virtual files.

2018-11-30 Thread Kadir Cetinkaya via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC348006: [clang] Fill RealPathName for virtual files. (authored by kadircet, committed by ). Changed prior to commit: https://reviews.llvm.org/D55054?vs=176146&id=176147#toc Repository: rC Clang CHAN

r348006 - [clang] Fill RealPathName for virtual files.

2018-11-30 Thread Kadir Cetinkaya via cfe-commits
Author: kadircet Date: Fri Nov 30 09:10:11 2018 New Revision: 348006 URL: http://llvm.org/viewvc/llvm-project?rev=348006&view=rev Log: [clang] Fill RealPathName for virtual files. Summary: Absolute path information for virtual files were missing even if we have already stat'd the files. This patc

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

2018-11-30 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. @arphaman, did you have a chance to run the tests? There's not rush, just wanted to know whether we have any data at all at how Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D54630/new/ https://reviews.llvm.org/D54630 ___

[PATCH] D55062: [clangd] Partition include graph on auto-index.

2018-11-30 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Comment at: clangd/index/Background.cpp:70 +// We keep only the node "Path" and its edges. +IncludeGraph getSubGraph(const URI &Uri, const IncludeGraph &FullGraph) { + IncludeGraph IG; Naming: technically the variable name sh

r348008 - Adding tests for -ast-dump; NFC.

2018-11-30 Thread Aaron Ballman via cfe-commits
Author: aaronballman Date: Fri Nov 30 09:19:06 2018 New Revision: 348008 URL: http://llvm.org/viewvc/llvm-project?rev=348008&view=rev Log: Adding tests for -ast-dump; NFC. This adds tests for GenericSelectionExpr; note that it points out a minor whitespace bug for selection expression cases. Mo

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

2018-11-30 Thread Gabor Marton via Phabricator via cfe-commits
martong created this revision. martong added reviewers: xazax.hun, balazske, a_sidorin. Herald added subscribers: cfe-commits, gamesh411, Szelethus, dkrupp, rnkovacs. Adding some more CTU list tests. E.g. to check if a construct is unsupported. We also slightly modify the handling of the return va

[PATCH] D52879: Derive builtin return type from its definition

2018-11-30 Thread Marco Antognini via Phabricator via cfe-commits
mantognini added a comment. Thank you for the detailed review. I'll work on a patch and add you as reviewer once done (prob. on Monday though). Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D52879/new/ https://reviews.llvm.org/D52879 __

[PATCH] D55124: [CodeComplete] Cleanup access checking in code completion

2018-11-30 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov updated this revision to Diff 176150. ilya-biryukov added a comment. - Add missed field init - Also fix access checks for member access with qualifiers Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55124/new/ https://reviews.llvm.org/D55124 Files:

  1   2   3   >