[PATCH] D53135: Remove top-level using declaration from header files, as these aliases leak.

2018-10-18 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added inline comments. Comment at: cfe/trunk/include/clang/Serialization/GlobalModuleIndex.h:147 static std::pair - readIndex(StringRef Path); + readIndex(llvm::StringRef Path); It's preferred to include clang/Basic/LLVM.h instead and use the

[PATCH] D52676: [clang-format] tweaked another case of lambda formatting

2018-10-18 Thread Daniel Jasper via Phabricator via cfe-commits
djasper added a comment. In https://reviews.llvm.org/D52676#1268748, @oleg.smolsky wrote: > In https://reviews.llvm.org/D52676#1268706, @djasper wrote: > > > Ok, I think I agree with both of you to a certain extent, but I also think > > this change as is, is not yet right. > > > > First, it

[PATCH] D53354: [WIP][NOT FOR COMMIT][PROTOTYPE] clang-scan-deps: dependency scanning tool rough prototype

2018-10-18 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added inline comments. Comment at: lib/Lex/FilterToIncludes.cpp:628 + First = Id.Last; + auto Kind = llvm::StringSwitch(Id.Name) + .Case("include", pp_include) arphaman wrote: > arphaman wrote: > > arphaman wrote: > > > ddunbar

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

2018-10-18 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexshap added a comment. I talked to David @dblaikie offline about this diff yesterday, if I understood correctly this change is reasonable in general, @echristo Eric, would you mind having a look at this diff ? https://reviews.llvm.org/D52296

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

2018-10-18 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexshap added a comment. Ping https://reviews.llvm.org/D52296 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D53263: [CodeGen] Fix places where the return type of a FunctionDecl was being used in place of the function type

2018-10-18 Thread Ben via Phabricator via cfe-commits
bobsayshilol updated this revision to Diff 170136. bobsayshilol edited the summary of this revision. bobsayshilol added a comment. Fixed the added assert to do the right thing. Clang can now build with a debug Clang built from this patch, and all unittests I could find pass in that built

r344767 - [COFF, ARM64] Enable unit test arm64-microsoft-status-reg.cpp only for aarch64 target

2018-10-18 Thread Mandeep Singh Grang via cfe-commits
Author: mgrang Date: Thu Oct 18 17:05:26 2018 New Revision: 344767 URL: http://llvm.org/viewvc/llvm-project?rev=344767=rev Log: [COFF, ARM64] Enable unit test arm64-microsoft-status-reg.cpp only for aarch64 target This should unbreak bots broken here:

[PATCH] D53238: [Driver] Add -static-{rtlib, stdlib} and make -static-{libgcc, libstdc++} their aliases

2018-10-18 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. Greeting from a dev meeting attendee :) Repository: rC Clang https://reviews.llvm.org/D53238 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D53115: [COFF, ARM64] Add _ReadStatusReg and_WriteStatusReg intrinsics

2018-10-18 Thread Mandeep Singh Grang via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC344765: [COFF, ARM64] Add _ReadStatusReg and_WriteStatusReg intrinsics (authored by mgrang, committed by ). Repository: rC Clang https://reviews.llvm.org/D53115 Files:

r344765 - [COFF, ARM64] Add _ReadStatusReg and_WriteStatusReg intrinsics

2018-10-18 Thread Mandeep Singh Grang via cfe-commits
Author: mgrang Date: Thu Oct 18 16:35:35 2018 New Revision: 344765 URL: http://llvm.org/viewvc/llvm-project?rev=344765=rev Log: [COFF, ARM64] Add _ReadStatusReg and_WriteStatusReg intrinsics Reviewers: rnk, compnerd, mstorsjo, efriedma, TomTan, haripul, javed.absar Reviewed By: efriedma

[PATCH] D53115: [COFF, ARM64] Add _ReadStatusReg and_WriteStatusReg intrinsics

2018-10-18 Thread Eli Friedman via Phabricator via cfe-commits
efriedma accepted this revision. efriedma added a comment. This revision is now accepted and ready to land. LGTM https://reviews.llvm.org/D53115 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D40988: Clang-format: add finer-grained options for putting all arguments on one line

2018-10-18 Thread Russell McClellan via Phabricator via cfe-commits
russellmcc added a comment. Bump! Thanks for your time! https://reviews.llvm.org/D40988 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D53115: [COFF, ARM64] Add _ReadStatusReg and_WriteStatusReg intrinsics

2018-10-18 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang updated this revision to Diff 170133. https://reviews.llvm.org/D53115 Files: include/clang/Basic/BuiltinsAArch64.def lib/CodeGen/CGBuiltin.cpp lib/Headers/intrin.h lib/Sema/SemaChecking.cpp test/CodeGen/arm64-microsoft-status-reg.cpp test/Sema/builtins-microsoft-arm64.c

[PATCH] D53354: [WIP][NOT FOR COMMIT][PROTOTYPE] clang-scan-deps: dependency scanning tool rough prototype

2018-10-18 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added a comment. In https://reviews.llvm.org/D53354#1267376, @whisperity wrote: > With regards to https://reviews.llvm.org/D53352: you can change the diff > related to a patch whilst keeping discuccion and metadata of the diff. Good point, thanks! > Please add a generic description

[PATCH] D52676: [clang-format] tweaked another case of lambda formatting

2018-10-18 Thread Oleg Smolsky via Phabricator via cfe-commits
oleg.smolsky added a comment. In https://reviews.llvm.org/D52676#1268706, @djasper wrote: > Ok, I think I agree with both of you to a certain extent, but I also think > this change as is, is not yet right. > > First, it does too much. The original very first example in this CL is > actually

[PATCH] D51633: [ASTImporter] Added error handling for AST import.

2018-10-18 Thread Aleksei Sidorin via Phabricator via cfe-commits
a_sidorin accepted this revision. a_sidorin added a comment. This revision is now accepted and ready to land. Hi Balasz, I cannot find any problems with the latest changes. I suggest you to commit the patch to make further reviews easier. Comment at:

[PATCH] D52676: [clang-format] tweaked another case of lambda formatting

2018-10-18 Thread Daniel Jasper via Phabricator via cfe-commits
djasper added a comment. Ok, I think I agree with both of you to a certain extent, but I also think this change as is, is not yet right. First, it does too much. The original very first example in this CL is actually not produced by clang-format (or if it is, I don't know with which flag

r344762 - [Test] Fix test file for C++98 mode

2018-10-18 Thread David Bolvansky via cfe-commits
Author: xbolva00 Date: Thu Oct 18 14:26:01 2018 New Revision: 344762 URL: http://llvm.org/viewvc/llvm-project?rev=344762=rev Log: [Test] Fix test file for C++98 mode Modified: cfe/trunk/test/SemaCXX/enum.cpp Modified: cfe/trunk/test/SemaCXX/enum.cpp URL:

r344761 - [Diagnostics] Add missing expected warning to test file

2018-10-18 Thread David Bolvansky via cfe-commits
Author: xbolva00 Date: Thu Oct 18 14:06:14 2018 New Revision: 344761 URL: http://llvm.org/viewvc/llvm-project?rev=344761=rev Log: [Diagnostics] Add missing expected warning to test file Modified: cfe/trunk/test/SemaCXX/enum.cpp Modified: cfe/trunk/test/SemaCXX/enum.cpp URL:

[clang-tools-extra] r344760 - [clang-tidy] readability-uppercase-literal-suffix: specify target for opencl test

2018-10-18 Thread Roman Lebedev via cfe-commits
Author: lebedevri Date: Thu Oct 18 13:59:03 2018 New Revision: 344760 URL: http://llvm.org/viewvc/llvm-project?rev=344760=rev Log: [clang-tidy] readability-uppercase-literal-suffix: specify target for opencl test I'm not sure if it will actually help or not. ppc64be-clang-lnt-test bot is

[PATCH] D52150: [clang-format] BeforeHash added to IndentPPDirectives

2018-10-18 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir requested changes to this revision. krasimir added a comment. This revision now requires changes to proceed. As per https://clang.llvm.org/docs/ClangFormatStyleOptions.html#adding-additional-style-options, could you please provide more info about the need for this option first?

[PATCH] D53410: Add missing PATH_MAX for GNU Hurd support

2018-10-18 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: lib/Basic/FileManager.cpp:514-519 +// For GNU Hurd +#if defined(__GNU__) && !defined(PATH_MAX) +# define PATH_MAX 4096 +#endif + + This doesn't appear to be necessary: the identifier PATH_MAX does not appear later in

[PATCH] D52527: [clang-format] fix Bug 38686: add AfterCaseLabel to BraceWrapping

2018-10-18 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir requested changes to this revision. krasimir added a comment. This revision now requires changes to proceed. OK, so this is not a real bug in the sense of non-working current features, it's more like a feature request. As per

[PATCH] D53072: [clang-format] Introduce the flag which allows not to shrink lines

2018-10-18 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir requested changes to this revision. krasimir added a comment. This revision now requires changes to proceed. In general there's a high bar for adding new style options to clang-format: https://clang.llvm.org/docs/ClangFormatStyleOptions.html#adding-additional-style-options

[PATCH] D52750: [Diagnostics] Check for integer overflow in array size expressions

2018-10-18 Thread Dávid Bolvanský via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL344759: [Diagnostics] Check for integer overflow in array size expressions (authored by xbolva00, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit:

r344759 - [Diagnostics] Check for integer overflow in array size expressions

2018-10-18 Thread David Bolvansky via cfe-commits
Author: xbolva00 Date: Thu Oct 18 13:49:06 2018 New Revision: 344759 URL: http://llvm.org/viewvc/llvm-project?rev=344759=rev Log: [Diagnostics] Check for integer overflow in array size expressions Summary: Fixes PR27439 Reviewers: rsmith, Rakete Reviewed By: rsmith Subscribers:

[PATCH] D52784: [ARM][AArch64] Pass through endianness flags to the GNU assembler and linker

2018-10-18 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added inline comments. Comment at: lib/Driver/ToolChains/Gnu.cpp:241 + case llvm::Triple::thumbeb: +IsBigEndian = true; + case llvm::Triple::arm: Gnu.cpp:241:17: warning: this statement may fall through [-Wimplicit-fallthrough=] IsBigEndian

[clang-tools-extra] r344758 - [clang-tidy] readability-uppercase-literal-suffix: specify target for fp tests

2018-10-18 Thread Roman Lebedev via cfe-commits
Author: lebedevri Date: Thu Oct 18 13:27:10 2018 New Revision: 344758 URL: http://llvm.org/viewvc/llvm-project?rev=344758=rev Log: [clang-tidy] readability-uppercase-literal-suffix: specify target for fp tests __float128 isn't universally avaliable. Modified:

[PATCH] D53410: Add missing PATH_MAX for GNU Hurd support

2018-10-18 Thread Sylvestre Ledru via Phabricator via cfe-commits
sylvestre.ledru created this revision. sylvestre.ledru added a reviewer: rnk. Herald added a subscriber: krytarowski. If you have a better place to put them, don't hesitate to let me know :) Patch by Svante Signell & myself Repository: rC Clang https://reviews.llvm.org/D53410 Files:

[PATCH] D52949: [Diagnostics] Implement -Wsizeof-pointer-div

2018-10-18 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. Second thought, I don't think we should recommend std::size here (maybe it should be okay for clang static analyzers) uint32_t data[] = {10, 20, 30, 40}; len = sizeof(data)/sizeof(*data); // "warn" on valid code to recommend std::size? I dont agree with such

[PATCH] D52771: [clang-tidy] Non-private member variables in classes (MISRA, CppCoreGuidelines, HICPP)

2018-10-18 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL344757: [clang-tidy] Non-private member variables in classes (MISRA, CppCoreGuidelines… (authored by lebedevri, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit:

[clang-tools-extra] r344757 - [clang-tidy] Non-private member variables in classes (MISRA, CppCoreGuidelines, HICPP)

2018-10-18 Thread Roman Lebedev via cfe-commits
Author: lebedevri Date: Thu Oct 18 13:16:44 2018 New Revision: 344757 URL: http://llvm.org/viewvc/llvm-project?rev=344757=rev Log: [clang-tidy] Non-private member variables in classes (MISRA, CppCoreGuidelines, HICPP) Summary: Finds classes that not only contain the data (non-static member

[PATCH] D52835: [Diagnostics] Check integer to floating point number implicit conversions

2018-10-18 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. Is PrecisionConversion acceptable? If not, any suggestions for name? https://reviews.llvm.org/D52835 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D52771: [clang-tidy] Non-private member variables in classes (MISRA, CppCoreGuidelines, HICPP)

2018-10-18 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri updated this revision to Diff 170112. lebedev.ri added a comment. Rebased to fix a merge conflict in release notes. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D52771 Files: clang-tidy/cppcoreguidelines/CppCoreGuidelinesTidyModule.cpp

[PATCH] D52670: [clang-tidy] Add new 'readability-uppercase-literal-suffix' check (CERT DCL16-C, MISRA C:2012, 7.3, MISRA C++:2008, 2-13-4)

2018-10-18 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL344755: [clang-tidy] Add new readability-uppercase-literal-suffix check (CERT DCL16-C… (authored by lebedevri, committed by ). Changed prior to commit:

[clang-tools-extra] r344755 - [clang-tidy] Add new 'readability-uppercase-literal-suffix' check (CERT DCL16-C, MISRA C:2012, 7.3, MISRA C++:2008, 2-13-4)

2018-10-18 Thread Roman Lebedev via cfe-commits
Author: lebedevri Date: Thu Oct 18 13:06:40 2018 New Revision: 344755 URL: http://llvm.org/viewvc/llvm-project?rev=344755=rev Log: [clang-tidy] Add new 'readability-uppercase-literal-suffix' check (CERT DCL16-C, MISRA C:2012, 7.3, MISRA C++:2008, 2-13-4) Summary: Detects when the integral

[PATCH] D52750: [Diagnostics] Check for integer overflow in array size expressions

2018-10-18 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith accepted this revision. rsmith added a comment. This revision is now accepted and ready to land. We can leave the cleanup of the expression evaluator to another change. https://reviews.llvm.org/D52750 ___ cfe-commits mailing list

[PATCH] D52670: [clang-tidy] Add new 'readability-uppercase-literal-suffix' check (CERT DCL16-C, MISRA C:2012, 7.3, MISRA C++:2008, 2-13-4)

2018-10-18 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. LGTM! Thanks for the changes! Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D52670 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D52771: [clang-tidy] Non-private member variables in classes (MISRA, CppCoreGuidelines, HICPP)

2018-10-18 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri updated this revision to Diff 170109. lebedev.ri marked an inline comment as done. lebedev.ri added a comment. Don't use `auto` in `getModuleOptions()`. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D52771 Files:

[PATCH] D52670: [clang-tidy] Add new 'readability-uppercase-literal-suffix' check (CERT DCL16-C, MISRA C:2012, 7.3, MISRA C++:2008, 2-13-4)

2018-10-18 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri updated this revision to Diff 170108. lebedev.ri marked 2 inline comments as done. lebedev.ri added a comment. CERT: also handle "lu", "llu". Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D52670 Files: clang-tidy/cert/CERTTidyModule.cpp

[PATCH] D53308: [Fixed Point Arithmetic] Fixed Point to Boolean Cast

2018-10-18 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: clang/lib/AST/ExprConstant.cpp:9599 + return false; +return Success(Val.getInt().getBoolValue(), E); + } I know you haven't really done constant-evaluation yet, but I think you should at least be setting up

[PATCH] D53372: [clang-tidy] Resolve readability-else-after-return false positive for constexpr if.

2018-10-18 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. Hmm, the latest patch only seems to have the changes to the test but not the implementation? Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D53372 ___ cfe-commits mailing list

[PATCH] D52670: [clang-tidy] Add new 'readability-uppercase-literal-suffix' check (CERT DCL16-C, MISRA C:2012, 7.3, MISRA C++:2008, 2-13-4)

2018-10-18 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. In https://reviews.llvm.org/D52670#1268572, @aaron.ballman wrote: > In https://reviews.llvm.org/D52670#1268569, @lebedev.ri wrote: > > > In https://reviews.llvm.org/D52670#1268564, @aaron.ballman wrote: > > > > > I talked to someone at CERT responsible for maintaining

[PATCH] D52670: [clang-tidy] Add new 'readability-uppercase-literal-suffix' check (CERT DCL16-C, MISRA C:2012, 7.3, MISRA C++:2008, 2-13-4)

2018-10-18 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In https://reviews.llvm.org/D52670#1268569, @lebedev.ri wrote: > In https://reviews.llvm.org/D52670#1268564, @aaron.ballman wrote: > > > I talked to someone at CERT responsible for maintaining DCL16-C to get > > their opinion on tightening the wording of the rule

[PATCH] D52670: [clang-tidy] Add new 'readability-uppercase-literal-suffix' check (CERT DCL16-C, MISRA C:2012, 7.3, MISRA C++:2008, 2-13-4)

2018-10-18 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. In https://reviews.llvm.org/D52670#1268564, @aaron.ballman wrote: > In https://reviews.llvm.org/D52670#1268372, @lebedev.ri wrote: > > > In https://reviews.llvm.org/D52670#1268347, @aaron.ballman wrote: > > > > > In https://reviews.llvm.org/D52670#1268170, @lebedev.ri

[PATCH] D53354: [WIP][NOT FOR COMMIT][PROTOTYPE] clang-scan-deps: dependency scanning tool rough prototype

2018-10-18 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added inline comments. Comment at: lib/Lex/FilterToIncludes.cpp:628 + First = Id.Last; + auto Kind = llvm::StringSwitch(Id.Name) + .Case("include", pp_include) arphaman wrote: > arphaman wrote: > > ddunbar wrote: > > > What is our

[PATCH] D52670: [clang-tidy] Add new 'readability-uppercase-literal-suffix' check (CERT DCL16-C, MISRA C:2012, 7.3, MISRA C++:2008, 2-13-4)

2018-10-18 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In https://reviews.llvm.org/D52670#1268372, @lebedev.ri wrote: > In https://reviews.llvm.org/D52670#1268347, @aaron.ballman wrote: > > > In https://reviews.llvm.org/D52670#1268170, @lebedev.ri wrote: > > > > > - Apply minor wording nits. > > > - For `cert-dcl16-c`,

[PATCH] D53354: [WIP][NOT FOR COMMIT][PROTOTYPE] clang-scan-deps: dependency scanning tool rough prototype

2018-10-18 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added inline comments. Comment at: lib/Lex/FilterToIncludes.cpp:628 + First = Id.Last; + auto Kind = llvm::StringSwitch(Id.Name) + .Case("include", pp_include) arphaman wrote: > ddunbar wrote: > > What is our feeling w.r.t. _Pragma,

[PATCH] D53406: [clangd] Provide excuses for bad code completions, based on diagnostics. C++ API only.

2018-10-18 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. In some circumstances we provide bad completions or no completions, because of problems in the code. This can be puzzling and opaque to

r344750 - Add check-clang-python to the Clang tests directory in IDEs; NFC.

2018-10-18 Thread Aaron Ballman via cfe-commits
Author: aaronballman Date: Thu Oct 18 10:47:18 2018 New Revision: 344750 URL: http://llvm.org/viewvc/llvm-project?rev=344750=rev Log: Add check-clang-python to the Clang tests directory in IDEs; NFC. Modified: cfe/trunk/bindings/python/tests/CMakeLists.txt Modified:

r344749 - Add language standard aliases for -std=c18, -std=gnu18, and -std=iso9899:2018.

2018-10-18 Thread Aaron Ballman via cfe-commits
Author: aaronballman Date: Thu Oct 18 10:42:41 2018 New Revision: 344749 URL: http://llvm.org/viewvc/llvm-project?rev=344749=rev Log: Add language standard aliases for -std=c18, -std=gnu18, and -std=iso9899:2018. As described in D40225, the C17 standard was balloted and approved in 2017, but

[PATCH] D53354: [WIP][NOT FOR COMMIT][PROTOTYPE] clang-scan-deps: dependency scanning tool rough prototype

2018-10-18 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added inline comments. Comment at: lib/Lex/FilterToIncludes.cpp:628 + First = Id.Last; + auto Kind = llvm::StringSwitch(Id.Name) + .Case("include", pp_include) ddunbar wrote: > What is our feeling w.r.t. _Pragma, which can in theory

[PATCH] D53207: Fix bug 26547 - alignof should return ABI alignment, not preferred alignment

2018-10-18 Thread Nicole Mazzuca via Phabricator via cfe-commits
ubsan added a comment. I'm having real difficulty with this - I get really odd errors in seemingly unrelated tests when I change things. Repository: rC Clang https://reviews.llvm.org/D53207 ___ cfe-commits mailing list

[PATCH] D53354: [WIP][NOT FOR COMMIT][PROTOTYPE] clang-scan-deps: dependency scanning tool rough prototype

2018-10-18 Thread Daniel Dunbar via Phabricator via cfe-commits
ddunbar added inline comments. Comment at: lib/Lex/FilterToIncludes.cpp:628 + First = Id.Last; + auto Kind = llvm::StringSwitch(Id.Name) + .Case("include", pp_include) What is our feeling w.r.t. _Pragma, which can in theory influence the

[PATCH] D53392: [RISCV] Collect library directories and triples for riscv64 triple too

2018-10-18 Thread James Clarke via Phabricator via cfe-commits
jrtc27 added inline comments. Comment at: test/Driver/riscv64-toolchain.c:71 +// RUN: %clang %s -### -no-canonical-prefixes -fuse-ld=ld \ +// RUN: -target riscv64-linux-unknown-elf \ +// RUN: --gcc-toolchain=%S/Inputs/multilib_riscv_linux_sdk \ This (and

[PATCH] D53392: [RISCV] Collect library directories and triples for riscv64 triple too

2018-10-18 Thread James Clarke via Phabricator via cfe-commits
jrtc27 added inline comments. Comment at: lib/Driver/ToolChains/Gnu.cpp:1912 - static const char *const RISCV32LibDirs[] = {"/lib", "/lib32"}; + static const char *const RISCVLibDirs[] = {"/lib", "/lib32"}; static const char *const RISCVTriples[] =

[PATCH] D53372: [clang-tidy] Resolve readability-else-after-return false positive for constexpr if.

2018-10-18 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius updated this revision to Diff 170101. curdeius added a comment. Applied changes as per comments. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D53372 Files: test/clang-tidy/readability-else-after-return-if-constexpr.cpp Index:

[PATCH] D52742: [analyzer][PlistMacroExpansion] Part 1.: New expand-macros flag

2018-10-18 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus marked 3 inline comments as done. Szelethus added inline comments. Comment at: lib/StaticAnalyzer/Core/AnalyzerOptions.cpp:469 +DisplayMacroExpansions = +getBooleanOption("expand-macros", /*Default=*/false); + return DisplayMacroExpansions.getValue();

[PATCH] D53404: [clangd] Set workspace root when initializing ClangdServer, disallow mutation.

2018-10-18 Thread Sam McCall via Phabricator via cfe-commits
sammccall created this revision. sammccall added a reviewer: ioeric. Herald added subscribers: cfe-commits, kadircet, arphaman, jkorous, MaskRay, ilya-biryukov. Rename instance variable to WorkspaceRoot to match what we call it internally. Add fixme to set it automatically. Don't do it yet,

[PATCH] D52730: [analyzer] ConversionChecker: handle floating point

2018-10-18 Thread Donát Nagy via Phabricator via cfe-commits
donat.nagy added inline comments. Comment at: lib/StaticAnalyzer/Checkers/ConversionChecker.cpp:164 +// double and possibly long double on some systems +RepresentsUntilExp = 53; break; + case 32: xazax.hun wrote: > A link to the source of

[PATCH] D53400: [clangd] Remove the overflow log.

2018-10-18 Thread Sam McCall via Phabricator via cfe-commits
sammccall accepted this revision. sammccall added a comment. This revision is now accepted and ready to land. Some nitty ideas about the log message, but whatever you think is best. Comment at: clangd/XRefs.cpp:43 + if (Line >= SymbolLocation::Position::MaxLine) +log("Get

[PATCH] D53389: [clangd] Clear the semantic of RefSlab::size.

2018-10-18 Thread Haojian Wu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rCTE344745: [clangd] Clear the semantic of RefSlab::size. (authored by hokein, committed by ). Changed prior to commit: https://reviews.llvm.org/D53389?vs=170063=170094#toc Repository: rL LLVM

[PATCH] D53389: [clangd] Clear the semantic of RefSlab::size.

2018-10-18 Thread Haojian Wu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL344745: [clangd] Clear the semantic of RefSlab::size. (authored by hokein, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM https://reviews.llvm.org/D53389 Files:

[clang-tools-extra] r344745 - [clangd] Clear the semantic of RefSlab::size.

2018-10-18 Thread Haojian Wu via cfe-commits
Author: hokein Date: Thu Oct 18 08:33:20 2018 New Revision: 344745 URL: http://llvm.org/viewvc/llvm-project?rev=344745=rev Log: [clangd] Clear the semantic of RefSlab::size. Summary: The RefSlab::size can easily cause confusions, it returns the number of different symbols, rahter than the number

[PATCH] D53400: [clangd] Remove the overflow log.

2018-10-18 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 170091. hokein added a comment. Add log in XRefs.cpp. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D53400 Files: clangd/XRefs.cpp clangd/index/Index.cpp Index: clangd/index/Index.cpp

[PATCH] D53391: [clangd] Embed fixes as CodeAction, instead of clangd_fixes. Clean up serialization.

2018-10-18 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. LGTM. Comment at: clangd/ClangdLSPServer.cpp:558 json::Object{ {"uri", URIForFile{File}}, +{"diagnostics",

[PATCH] D53400: [clangd] Remove the overflow log.

2018-10-18 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. After looking at the examples, I'm reassured that we don't really care about tracking precise locations of those references :-) I'd suggest adding the logging just to where the field is *read* in XRefs.cpp (check if it's max-value). That would cover a bunch of the

r344742 - [X86][Tests] Make sure tls-direct-seg-refs tests only run where supported

2018-10-18 Thread Kristina Brooks via cfe-commits
Author: kristina Date: Thu Oct 18 07:44:25 2018 New Revision: 344742 URL: http://llvm.org/viewvc/llvm-project?rev=344742=rev Log: [X86][Tests] Make sure tls-direct-seg-refs tests only run where supported This flag is only supported for x86 targets, make sure the tests only run for those.

[PATCH] D53400: [clangd] Remove the overflow log.

2018-10-18 Thread Haojian Wu via Phabricator via cfe-commits
hokein created this revision. hokein added a reviewer: sammccall. Herald added subscribers: kadircet, arphaman, jkorous, MaskRay, ioeric, ilya-biryukov. LLVM codebase has generated files (all are build/Target/XXX/*.inc) that exceed the MaxLine & MaxColumn. Printing these log would be noisy.

[PATCH] D53398: [clangd] Enforce rules around "initialize" request, and create ClangdServer lazily.

2018-10-18 Thread Sam McCall via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL344741: [clangd] Enforce rules around initialize request, and create ClangdServer… (authored by sammccall, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM

[clang-tools-extra] r344741 - [clangd] Enforce rules around "initialize" request, and create ClangdServer lazily.

2018-10-18 Thread Sam McCall via cfe-commits
Author: sammccall Date: Thu Oct 18 07:41:50 2018 New Revision: 344741 URL: http://llvm.org/viewvc/llvm-project?rev=344741=rev Log: [clangd] Enforce rules around "initialize" request, and create ClangdServer lazily. Summary: LSP is a slightly awkward map to C++ object lifetimes: the initialize

[PATCH] D53399: [clangd] Ensure that we reply to each call exactly once. NFC (I think!)

2018-10-18 Thread Sam McCall via Phabricator via cfe-commits
sammccall created this revision. sammccall added a reviewer: ioeric. Herald added subscribers: cfe-commits, kadircet, jfb, arphaman, jkorous, MaskRay, ilya-biryukov. In debug builds, getting this wrong will trigger asserts. In production builds, it will send an error reply if none was sent, and

r344740 - [OPENMP] Move OMPClausePrinter to OpenMPClause.h/OpenMPClause.cpp - NFC. Differential Revision: https://reviews.llvm.org/D53102

2018-10-18 Thread Patrick Lyster via cfe-commits
Author: plyster Date: Thu Oct 18 07:28:23 2018 New Revision: 344740 URL: http://llvm.org/viewvc/llvm-project?rev=344740=rev Log: [OPENMP] Move OMPClausePrinter to OpenMPClause.h/OpenMPClause.cpp - NFC. Differential Revision: https://reviews.llvm.org/D53102 Modified:

[PATCH] D53102: Support for the mno-tls-direct-seg-refs flag

2018-10-18 Thread Ruslan Nikolaev via Phabricator via cfe-commits
nruslan added a comment. @kristina : Thank you very much for taking care of the patchsets! Repository: rC Clang https://reviews.llvm.org/D53102 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D53339: [clang-tidy] Add the abseil-duration-factory-float check

2018-10-18 Thread Hyrum Wright via Phabricator via cfe-commits
hwright added inline comments. Comment at: clang-tidy/abseil/DurationFactoryFloatCheck.cpp:34 +llvm::APSInt ApInt(/*BitWidth=*/64, /*isUnsigned=*/false); +ApInt = static_cast(value); +if (is_negative) JonasToth wrote: > Wouldn't it make more sense to

[PATCH] D53339: [clang-tidy] Add the abseil-duration-factory-float check

2018-10-18 Thread Hyrum Wright via Phabricator via cfe-commits
hwright updated this revision to Diff 170083. hwright marked 6 inline comments as done. hwright added a comment. Addressed reviewer comments. https://reviews.llvm.org/D53339 Files: clang-tidy/abseil/AbseilTidyModule.cpp clang-tidy/abseil/CMakeLists.txt

[PATCH] D53372: [clang-tidy] Resolve readability-else-after-return false positive for constexpr if.

2018-10-18 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: test/clang-tidy/readability-else-after-return-if-constexpr.cpp:9 +return; + // CHECK-MESSAGES: [[@LINE-2]]:3: warning: + Please add some of the warning text -- any warning will match this.

[PATCH] D53102: Support for the mno-tls-direct-seg-refs flag

2018-10-18 Thread Kristina Brooks via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC344739: Add support for -mno-tls-direct-seg-refs to Clang (authored by kristina, committed by ). Changed prior to commit: https://reviews.llvm.org/D53102?vs=169224=170082#toc Repository: rC Clang

r344739 - Add support for -mno-tls-direct-seg-refs to Clang

2018-10-18 Thread Kristina Brooks via cfe-commits
Author: kristina Date: Thu Oct 18 07:07:02 2018 New Revision: 344739 URL: http://llvm.org/viewvc/llvm-project?rev=344739=rev Log: Add support for -mno-tls-direct-seg-refs to Clang This patch exposes functionality added in rL344723 to the Clang driver/frontend as a flag and adds appropriate

[PATCH] D53102: Support for the mno-tls-direct-seg-refs flag

2018-10-18 Thread Ruslan Nikolaev via Phabricator via cfe-commits
nruslan added a comment. In https://reviews.llvm.org/D53102#1268364, @kristina wrote: > By the way, out of curiosity is this for anything specific (alternative libc > or some user-mode-scheduling implementation)? Not nitpicking, just curious > since it's an interesting topic in general and

[PATCH] D53398: [clangd] Enforce rules around "initialize" request, and create ClangdServer lazily.

2018-10-18 Thread Eric Liu via Phabricator via cfe-commits
ioeric accepted this revision. ioeric added a comment. This revision is now accepted and ready to land. Looks good! Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D53398 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D53398: [clangd] Enforce rules around "initialize" request, and create ClangdServer lazily.

2018-10-18 Thread Sam McCall via Phabricator via cfe-commits
sammccall created this revision. sammccall added a reviewer: ioeric. Herald added subscribers: cfe-commits, kadircet, arphaman, jkorous, MaskRay, ilya-biryukov. LSP is a slightly awkward map to C++ object lifetimes: the initialize request is part of the protocol and provides information that

[PATCH] D53397: [MinGW] Link to correct openmp library

2018-10-18 Thread Peiyuan Song via Phabricator via cfe-commits
SquallATF created this revision. Herald added subscribers: cfe-commits, guansong. Repository: rC Clang https://reviews.llvm.org/D53397 Files: lib/Driver/ToolChains/MinGW.cpp Index: lib/Driver/ToolChains/MinGW.cpp === ---

[PATCH] D53395: [OPENMP] Move OMPClausePrinter to OpenMPClause.h/OpenMPClause.cpp - NFC

2018-10-18 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev accepted this revision. ABataev added a comment. This revision is now accepted and ready to land. LG Repository: rC Clang https://reviews.llvm.org/D53395 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D52670: [clang-tidy] Add new 'readability-uppercase-literal-suffix' check (CERT DCL16-C, MISRA C:2012, 7.3, MISRA C++:2008, 2-13-4)

2018-10-18 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. In https://reviews.llvm.org/D52670#1268347, @aaron.ballman wrote: > In https://reviews.llvm.org/D52670#1268170, @lebedev.ri wrote: > > > - Apply minor wording nits. > > - For `cert-dcl16-c`, **only** consider `L`, `LL` suffixes, not > > **anything** else (not even

[PATCH] D52771: [clang-tidy] Non-private member variables in classes (MISRA, CppCoreGuidelines, HICPP)

2018-10-18 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. In https://reviews.llvm.org/D52771#1268367, @aaron.ballman wrote: > LGTM aside from a minor nit. Thank you for the review! Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D52771 ___ cfe-commits mailing

[PATCH] D52771: [clang-tidy] Non-private member variables in classes (MISRA, CppCoreGuidelines, HICPP)

2018-10-18 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 aside from a minor nit. Comment at: clang-tidy/cppcoreguidelines/CppCoreGuidelinesTidyModule.cpp:84 +ClangTidyOptions Options; +auto =

[PATCH] D53102: Support for the mno-tls-direct-seg-refs flag

2018-10-18 Thread Kristina Brooks via Phabricator via cfe-commits
kristina added a comment. By the way, out of curiosity is this for anything specific (alternative libc or some user-mode-scheduling implementation)? Not nitpicking, just curious since it's an interesting topic in general and it's frustrating that the architecture is so limited in terms of

[PATCH] D52670: [clang-tidy] Add new 'readability-uppercase-literal-suffix' check (CERT DCL16-C, MISRA C:2012, 7.3, MISRA C++:2008, 2-13-4)

2018-10-18 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In https://reviews.llvm.org/D52670#1268170, @lebedev.ri wrote: > - Apply minor wording nits. > - For `cert-dcl16-c`, **only** consider `L`, `LL` suffixes, not **anything** > else (not even `llu`). I'll find out about the DCL16-C recommendation, as I suspect the

[PATCH] D52988: [analyzer][PlistMacroExpansion] Part 5.: Support for # and ##

2018-10-18 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus updated this revision to Diff 170073. Szelethus added a comment. Fixed an issue where if `##` had spaces around it, those spaces weren't removed. https://reviews.llvm.org/D52988 Files: lib/StaticAnalyzer/Core/PlistDiagnostics.cpp

[PATCH] D53392: [RISCV] Collect library directories and triples for riscv64 triple too

2018-10-18 Thread Edward Jones via Phabricator via cfe-commits
edward-jones created this revision. edward-jones added a reviewer: asb. Herald added subscribers: cfe-commits, jocewei, PkmX, rkruppe, the_o, brucehoult, MartinMosbeck, rogfer01, mgrang, zzheng, jrtc27, shiva0217, kito-cheng, niosHD, sabuasal, apazos, simoncook, johnrusso, rbar, arichardson,

[PATCH] D53387: [clangd] Lay JSONRPCDispatcher to rest.

2018-10-18 Thread Sam McCall via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rCTE344737: [clangd] Lay JSONRPCDispatcher to rest. (authored by sammccall, committed by ). Changed prior to commit: https://reviews.llvm.org/D53387?vs=170038=170072#toc Repository: rCTE Clang Tools

[clang-tools-extra] r344737 - [clangd] Lay JSONRPCDispatcher to rest.

2018-10-18 Thread Sam McCall via cfe-commits
Author: sammccall Date: Thu Oct 18 05:32:04 2018 New Revision: 344737 URL: http://llvm.org/viewvc/llvm-project?rev=344737=rev Log: [clangd] Lay JSONRPCDispatcher to rest. Summary: Most of its functionality is moved into ClangdLSPServer. The decoupling between JSONRPCDispatcher,

[PATCH] D53387: [clangd] Lay JSONRPCDispatcher to rest.

2018-10-18 Thread Sam McCall via Phabricator via cfe-commits
sammccall marked an inline comment as done. sammccall added inline comments. Comment at: clangd/ClangdLSPServer.cpp:148 + if (Trace) +(*Trace)["Reply"] = *Result; + Server.reply(ID, json::Value(std::move(*Result))); ioeric wrote: >

[PATCH] D53102: Support for the mno-tls-direct-seg-refs flag

2018-10-18 Thread Ruslan Nikolaev via Phabricator via cfe-commits
nruslan added a comment. In https://reviews.llvm.org/D53102#1268272, @kristina wrote: > If the author doesn't mind I can just apply the style fix after patching and > then rebuild and run all the relevant tests (or would you prefer to do > that?). Seems easier than a new revision for an

[PATCH] D53374: [clangd] Names that are not spelled in source code are reserved.

2018-10-18 Thread Eric Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL344736: [clangd] Names that are not spelled in source code are reserved. (authored by ioeric, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM

[clang-tools-extra] r344736 - [clangd] Names that are not spelled in source code are reserved.

2018-10-18 Thread Eric Liu via cfe-commits
Author: ioeric Date: Thu Oct 18 05:23:05 2018 New Revision: 344736 URL: http://llvm.org/viewvc/llvm-project?rev=344736=rev Log: [clangd] Names that are not spelled in source code are reserved. Summary: These are often not expected to be used directly e.g. ``` TEST_F(Fixture, X) { ^ //

[PATCH] D53374: [clangd] Names that are not spelled in source code are reserved.

2018-10-18 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 170068. ioeric marked an inline comment as done. ioeric added a comment. - add isImplementationDetail helper Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D53374 Files: clangd/AST.cpp clangd/AST.h clangd/Quality.cpp clangd/Quality.h

[PATCH] D53391: [clangd] Embed fixes as CodeAction, instead of clangd_fixes. Clean up serialization.

2018-10-18 Thread Sam McCall via Phabricator via cfe-commits
sammccall created this revision. sammccall added reviewers: hokein, arphaman. Herald added subscribers: cfe-commits, kadircet, jkorous, MaskRay, ioeric, ilya-biryukov. CodeAction provides us with a standard way of representing fixes inline, so use it, replacing our existing ad-hoc extension.

[PATCH] D53387: [clangd] Lay JSONRPCDispatcher to rest.

2018-10-18 Thread Eric Liu via Phabricator via cfe-commits
ioeric accepted this revision. ioeric added a comment. This revision is now accepted and ready to land. lgtm Comment at: clangd/ClangdLSPServer.cpp:148 + if (Trace) +(*Trace)["Reply"] = *Result; + Server.reply(ID, json::Value(std::move(*Result)));

  1   2   >