[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 170045. lebedev.ri marked 6 inline comments as done. lebedev.ri added a comment. - Apply minor wording nits. - For `cert-dcl16-c`, **only** consider `L`, `LL` suffixes, not **anything** else (not even `llu`). Repository: rCTE Clang Tools Extra https:/

[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 170046. ioeric marked 3 inline comments as done. ioeric added a comment. - address comments Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D53374 Files: clangd/AST.cpp clangd/AST.h clangd/Quality.cpp clangd/Quality.h clangd/index/In

[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 added inline comments. Comment at: clangd/Quality.cpp:182 if (auto *ID = SemaCCResult.Declaration->getIdentifier()) - ReservedName = ReservedName || isReserved(ID->getName()); + ReservedName = ReservedName || isReserved(ID->getName()) || +

r344730 - [TI removal] Test predicate rather than casting to detect a terminator

2018-10-18 Thread Chandler Carruth via cfe-commits
Author: chandlerc Date: Thu Oct 18 01:16:20 2018 New Revision: 344730 URL: http://llvm.org/viewvc/llvm-project?rev=344730&view=rev Log: [TI removal] Test predicate rather than casting to detect a terminator and use the range based successor API. Modified: cfe/trunk/lib/CodeGen/CGLoopInfo.cpp

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

2018-10-18 Thread Donát Nagy via Phabricator via cfe-commits
donat.nagy added a comment. Herald added a subscriber: dkrupp. polite ping Repository: rC Clang https://reviews.llvm.org/D52730 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[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 added a comment. In https://reviews.llvm.org/D53372#1267728, @lebedev.ri wrote: > I think it would be good to add some more explanation as to *why* that `else` > has to be kept. Do you mean add a comment in the code or just an explanation for the review? For the latter, e.g.: // u

[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 added a comment. Actually, I can make it an option for this check to skip or not constexpr ifs, WDYT? Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D53372 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://list

[PATCH] D53363: [clangd] Encode Line/Column as a 32-bits integer.

2018-10-18 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 170053. hokein marked 6 inline comments as done. hokein added a comment. Address review comments. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D53363 Files: clangd/FindSymbols.cpp clangd/XRefs.cpp clangd/index/Index.cpp clangd/index

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

2018-10-18 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added inline comments. Comment at: lib/StaticAnalyzer/Checkers/ConversionChecker.cpp:164 +// double and possibly long double on some systems +RepresentsUntilExp = 53; break; + case 32: A link to the source of these number would be u

[PATCH] D53363: [clangd] Encode Line/Column as a 32-bits integer.

2018-10-18 Thread Haojian Wu via Phabricator via cfe-commits
hokein added a comment. > In https://reviews.llvm.org/D53363#1267721, @hokein wrote: > >> Yeah, I have a rough patch for it, using char* will save us ~50MB memory, >> which will lead to ~300 MB memory usage in total. > > > For just the StringRef in SymbolLocation::Position, or for all our stri

[PATCH] D53377: [clang-tidy] Ignore a case where the fix of make_unique check introduces side effect.

2018-10-18 Thread Haojian Wu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL344733: [clang-tidy] Ignore a case where the fix of make_unique check introduces side… (authored by hokein, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM https://reviews.

[clang-tools-extra] r344733 - [clang-tidy] Ignore a case where the fix of make_unique check introduces side effect.

2018-10-18 Thread Haojian Wu via cfe-commits
Author: hokein Date: Thu Oct 18 02:13:34 2018 New Revision: 344733 URL: http://llvm.org/viewvc/llvm-project?rev=344733&view=rev Log: [clang-tidy] Ignore a case where the fix of make_unique check introduces side effect. Summary: Previously, ptr.reset(new char[5]) will be replaced with `p = make_u

[PATCH] D53377: [clang-tidy] Ignore a case where the fix of make_unique check introduces side effect.

2018-10-18 Thread Haojian Wu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rCTE344733: [clang-tidy] Ignore a case where the fix of make_unique check introduces side… (authored by hokein, committed by ). Changed prior to commit: https://reviews.llvm.org/D53377?vs=170012&id=170054

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

2018-10-18 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. In https://reviews.llvm.org/D53372#1268207, @curdeius wrote: > In https://reviews.llvm.org/D53372#1267728, @lebedev.ri wrote: > > > I think it would be good to add some more explanation as to *why* that > > `else` has to be kept. > > > Do you mean add a comment in the

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

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. The RefSlab::size can easily cause confusions, it returns the number of different symbols, rahter than the number of all references. - rename s

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

2018-10-18 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. Adding numRefs() and fixing occurrences makes sense. However I think `size()` needs to stay - it's an important part of the "container" concept, and e.g. GTest relies on it. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D53389 _

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

2018-10-18 Thread Sam McCall via Phabricator via cfe-commits
sammccall accepted this revision. sammccall added inline comments. This revision is now accepted and ready to land. Comment at: clangd/Quality.cpp:181 if (SemaCCResult.Declaration) { +if (!isSpelledInSourceCode(SemaCCResult.Declaration)) + ImplementationDetail = true;

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

2018-10-18 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 170063. hokein added a comment. - reserve the size name, added a comment indicating its senmatic. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D53389 Files: clangd/index/Background.cpp clangd/index/FileIndex.cpp clangd/index/Index.cpp

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

2018-10-18 Thread Haojian Wu via Phabricator via cfe-commits
hokein added a comment. In https://reviews.llvm.org/D53389#1268250, @sammccall wrote: > Adding numRefs() and fixing occurrences makes sense. > However I think `size()` needs to stay - it's an important part of the > "container" concept, and e.g. GTest relies on it. OK, and I added a comment f

[clang-tools-extra] r344735 - [clangd] Encode Line/Column as a 32-bits integer.

2018-10-18 Thread Haojian Wu via cfe-commits
Author: hokein Date: Thu Oct 18 03:43:50 2018 New Revision: 344735 URL: http://llvm.org/viewvc/llvm-project?rev=344735&view=rev Log: [clangd] Encode Line/Column as a 32-bits integer. Summary: This would buy us more memory. Using a 32-bits integer is enough for most human-readable source code (up

[PATCH] D53363: [clangd] Encode Line/Column as a 32-bits integer.

2018-10-18 Thread Haojian Wu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rCTE344735: [clangd] Encode Line/Column as a 32-bits integer. (authored by hokein, committed by ). Changed prior to commit: https://reviews.llvm.org/D53363?vs=170053&id=170064#toc Repository: rCTE Clan

[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. 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 indentation change on one line. https://reviews.llvm.org/D53102 _

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

2018-10-18 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added a comment. To the reviewers: Please accept this patch formally if you do not find any problems. This is an intermediate state of the code and there is more work that is dependent on this change. Repository: rC Clang https://reviews.llvm.org/D51633 _

[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 170065. lebedev.ri marked 6 inline comments as done. lebedev.ri added a comment. - Address nits - Proper default for CPPCG - Don't show record name. I indeed don't have a strong case here, it seems to be more useful to dump that info, but maybe not? ¯\_(ツ)

[PATCH] D52034: [Clang] Add options -Xclang -coverage-filter and -Xclang -coverage-exclude to filter the files to instrument with gcov

2018-10-18 Thread calixte via Phabricator via cfe-commits
calixte added a comment. @vsk, gcc guys are ok for -fprofile-filter-files and -fprofile-exclude-files, are you ok with that ? Should these options prefixed by -Xclang or not ? Repository: rC Clang https://reviews.llvm.org/D52034 ___ cfe-commits

[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)));

[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. Aft

[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

[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&view=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) { ^ // "Fi

[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 https://reviews.llvm.org/D5337

[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 indenta

[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: > d

[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&view=rev Log: [clangd] Lay JSONRPCDispatcher to rest. Summary: Most of its functionality is moved into ClangdLSPServer. The decoupling between JSONRPCDispatcher, ProtocolCallb

[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&id=170072#toc Repository: rCTE Clang Tools

[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, ema

[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 test/Analysis/Inputs/expected-plists/plist-macros-w

[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 i

[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 regis

[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 &Opts = Option

[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 l

[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 `ll

[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 http://lists.llvm.org/cgi-bi

[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 === --- lib/D

[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 does

[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 http://

[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 it's

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&view=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 m

[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&id=170082#toc Repository: rC Clang

[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. C

[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 clang-tidy/abseil/DurationFactoryFlo

[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] 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 http://lists.llvm.org/cgi-bin/mailman/listinfo

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&view=rev Log: [OPENMP] Move OMPClausePrinter to OpenMPClause.h/OpenMPClause.cpp - NFC. Differential Revision: https://reviews.llvm.org/D53102 Modified: cfe/trunk/include/cl

[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 d

[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&view=rev Log: [clangd] Enforce rules around "initialize" request, and create ClangdServer lazily. Summary: LSP is a slightly awkward map to C++ object lifetimes: the initiali

[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 https://reviews

[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. Rep

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&view=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. M

[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 cas

[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", std::move

[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 ===

[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&view=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 nu

[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-t

[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&id=170094#toc Repository: rL LLVM http

[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] 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 the

[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, clie

[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] 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: test/clang-tidy/readability-else-after

[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[] = {"riscv32-unknown-linux-

[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 belo

[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 prepr

[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 cfe-commits@lists.llvm.org

[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 in

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&view=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

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&view=rev Log: Add check-clang-python to the Clang tests directory in IDEs; NFC. Modified: cfe/trunk/bindings/python/tests/CMakeLists.txt Modified: cfe/trunk/bindings/p

[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

[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, wh

[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: > arphaman wrote: > > ddunbar wrote: > > > What is our feel

[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] 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 a

[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] 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 cfe-commits@lists.llvm.or

[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 o

[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 clang-tidy/cert/CMakeLists

[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: clang-tidy/cppcoreguidelines/CppCoreGuidelinesTidyMo

[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 http://lists.llvm.org/cg

[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 cfe-commits@

[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&view=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 l

[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: https://reviews.llvm.org/D52670?vs=170108&id=17

[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 clang-tidy/misc/CMakeLists

[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

[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&view=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] 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: https://

[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 behaviour.

[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: lib/B

[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&view=rev Log: [clang-tidy] readability-uppercase-literal-suffix: specify target for fp tests __float128 isn't universally avaliable. Modified: clang-tools-extra/trunk/te

[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 =

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&view=rev Log: [Diagnostics] Check for integer overflow in array size expressions Summary: Fixes PR27439 Reviewers: rsmith, Rakete Reviewed By: rsmith Subscribers: Raket

  1   2   >