[PATCH] D38943: [ASTImporter] import SubStmt of CaseStmt

2018-03-27 Thread Rafael Stahl via Phabricator via cfe-commits
r.stahl added inline comments. Herald added a subscriber: martong. Comment at: cfe/trunk/unittests/AST/ASTImporterTest.cpp:100 + // This traverses the AST to catch certain bugs like poorly or not + // implemented subtrees. a.sidorin wrote: > I just saw this c

[PATCH] D38943: [ASTImporter] import SubStmt of CaseStmt

2018-03-27 Thread Gabor Marton via Phabricator via cfe-commits
martong added inline comments. Comment at: cfe/trunk/unittests/AST/ASTImporterTest.cpp:100 + // This traverses the AST to catch certain bugs like poorly or not + // implemented subtrees. r.stahl wrote: > a.sidorin wrote: > > I just saw this change and I canno

[PATCH] D44831: [clang-format] Refine ObjC guesser to handle child lines of child lines

2018-03-27 Thread Daniel Jasper via Phabricator via cfe-commits
djasper added inline comments. Comment at: lib/Format/Format.cpp:1449 const AdditionalKeywords &Keywords) { +for (auto Line : AnnotatedLines) + if (LineContainsObjCCode(*Line, Keywords)) I would not create a second function her

[PATCH] D44882: [clangd] Implementation of workspace/symbol request

2018-03-27 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. >>> - Current `fuzzyFind` implementation can only match qualifiers strictly >>> (i.e. st::vector won't match std::vector). Should we look into allowing >>> fuzzy matches for this feature? (not in this patch, rather in the long >>> term). >> >> I'm not sure, I'm

[PATCH] D44882: [clangd] Implementation of workspace/symbol request

2018-03-27 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. > I'm highly in favor of enabling fuzzy matching for `workspaceSymbols`. At lest for the name themselves. Non-fuzzy matching of qualifiers does not look that important. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D44882 _

[PATCH] D44826: Add -Wunused-using, a warning that finds unused using declarations.

2018-03-27 Thread Carlos Alberto Enciso via Phabricator via cfe-commits
CarlosAlbertoEnciso added a comment. In https://reviews.llvm.org/D44826#1046906, @dblaikie wrote: > First of all, thanks very much for your feedback. > While implementing the warning is great (wonder if there's any codebase > that isn't -Wunused-using clean, that we could use to compare Clang

[PATCH] D44842: Add Parameters to DW_AT_name Attribute of Template Variables

2018-03-27 Thread Jonas Devlieghere via Phabricator via cfe-commits
JDevlieghere added inline comments. Comment at: lib/CodeGen/CGDebugInfo.cpp:2992 + std::string NameString = Name.str(); + llvm::raw_string_ostream ParameterizedName(NameString); + ParameterizedName << "<"; Why not use Name.str() directly? Reposit

[PATCH] D43281: [AMDGPU] fixes for lds f32 builtins

2018-03-27 Thread Daniil Fukalov via Phabricator via cfe-commits
dfukalov added a comment. ping... Repository: rC Clang https://reviews.llvm.org/D43281 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D41648: [clang-tidy] implement cppcoreguidelines macro rules

2018-03-27 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added inline comments. Comment at: docs/clang-tidy/checks/cppcoreguidelines-macro-usage.rst:24 + +.. option:: CheckCapsOnly + Eugene.Zelenko wrote: > Will be good idea to generalize this option with other check which deal with > macros. I dont think th

[PATCH] D38455: [clang-tidy] new cppcoreguidelines-narrowing-conversions check.

2018-03-27 Thread Clement Courbet via Phabricator via cfe-commits
courbet added a comment. OK, here's an analysis of 100 instances of a check that would warn on all fully implicit (no C/static/reinterpret/...) casts from float/double to integral: link I don't ex

[PATCH] D44559: [Sema] Wrong width of result of mul operation

2018-03-27 Thread Andrew V. Tischenko via Phabricator via cfe-commits
avt77 added a comment. > If that operation overflows, so be it — we're not going to warn about the > potential for overflow every time the user adds two ints, and by the same > token, it doesn't make any sense to warn about every time the user adds two > shorts just because the language made th

r328618 - [ASTMatchers] Add isAssignmentOperator matcher

2018-03-27 Thread Peter Szecsi via cfe-commits
Author: szepet Date: Tue Mar 27 05:11:46 2018 New Revision: 328618 URL: http://llvm.org/viewvc/llvm-project?rev=328618&view=rev Log: [ASTMatchers] Add isAssignmentOperator matcher Adding a matcher for BinaryOperator and cxxOperatorCallExpr to be able to decide whether it is any kind of assignment

[PATCH] D44893: [ASTMatchers] Add isAssignmentOperator matcher

2018-03-27 Thread Peter Szecsi via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC328618: [ASTMatchers] Add isAssignmentOperator matcher (authored by szepet, committed by ). Changed prior to commit: https://reviews.llvm.org/D44893?vs=139769&id=139900#toc Repository: rC Clang http

r328619 - [analyzer] LoopUnrolling: update the matched assignment operators

2018-03-27 Thread Peter Szecsi via cfe-commits
Author: szepet Date: Tue Mar 27 05:16:56 2018 New Revision: 328619 URL: http://llvm.org/viewvc/llvm-project?rev=328619&view=rev Log: [analyzer] LoopUnrolling: update the matched assignment operators Extended the matched assignment operators when checking for bound changes in a body of the loop b

[PATCH] D38921: [analyzer] LoopUnrolling: update the matched assignment operators

2018-03-27 Thread Peter Szecsi via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC328619: [analyzer] LoopUnrolling: update the matched assignment operators (authored by szepet, committed by ). Repository: rC Clang https://reviews.llvm.org/D38921 Files: lib/StaticAnalyzer/Core/Loo

[PATCH] D44559: [Sema] Wrong width of result of mul operation

2018-03-27 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. In https://reviews.llvm.org/D44559#1049049, @avt77 wrote: > ... > But I don't mind to close the review - and the corresponding bug of course. I disagree with closing the bug. It's a real issue that is not detected/diagnosed by anything in clang (diagnostic, sanitiz

[PATCH] D44816: [clang-format] Do not insert space before closing brace in ObjC dict literal

2018-03-27 Thread Daniel Jasper via Phabricator via cfe-commits
djasper accepted this revision. djasper added a comment. This revision is now accepted and ready to land. Generally looks good, one minor simplification. Comment at: lib/Format/TokenAnnotator.cpp:2484 + if (Right.is(tok::r_brace) && Right.MatchingParen && + Right.Matching

[PATCH] D44921: [PowerPC] Option for secure plt mode

2018-03-27 Thread Strahinja Petrovic via Phabricator via cfe-commits
spetrovic created this revision. spetrovic added reviewers: jhibbits, nemanjai. Herald added a subscriber: kbarton. This patch enables option for secure plt mode in clang (-msecure-plt). This feature is supported in backend also (https://reviews.llvm.org/D42112). https://reviews.llvm.org/D44921

[PATCH] D44815: [AArch64]: Add support for parsing rN registers.

2018-03-27 Thread Tim Northover via Phabricator via cfe-commits
t.p.northover added a comment. The warning you're seeing is because without an operand modifier Clang always chooses an x-register in its textual assembly expansion. This 64-bit default is compared to the underlying C type to determine whether a warning should be emitted, and I think that's rea

r328621 - Revert "[clang-format] Remove empty lines before }[; ] // comment"

2018-03-27 Thread Krasimir Georgiev via cfe-commits
Author: krasimir Date: Tue Mar 27 06:14:29 2018 New Revision: 328621 URL: http://llvm.org/viewvc/llvm-project?rev=328621&view=rev Log: Revert "[clang-format] Remove empty lines before }[;] // comment" This reverts commit r327861. The empty line before namespaces is desired in some places. We nee

[PATCH] D44927: Enable msan unconditionally on Linux

2018-03-27 Thread vit9696 via Phabricator via cfe-commits
vit9696 created this revision. vit9696 added a reviewer: eugenis. Herald added a subscriber: cfe-commits. Memeory sanitizer compatibility are already done in MemorySanitizer::doInitialization. It verifies whether the necessary offsets exist and bails out if not. For this reason it is no good to

[clang-tools-extra] r328622 - [clang-move] Fix test failing due to clang-format change

2018-03-27 Thread Krasimir Georgiev via cfe-commits
Author: krasimir Date: Tue Mar 27 06:39:33 2018 New Revision: 328622 URL: http://llvm.org/viewvc/llvm-project?rev=328622&view=rev Log: [clang-move] Fix test failing due to clang-format change r328621 reverted the removal of empty lines before the closing `}` in namespaces. Modified: clang-to

r328623 - Move a ref-counted pointer instead of copying it. NFC.

2018-03-27 Thread Alexander Kornienko via cfe-commits
Author: alexfh Date: Tue Mar 27 07:02:06 2018 New Revision: 328623 URL: http://llvm.org/viewvc/llvm-project?rev=328623&view=rev Log: Move a ref-counted pointer instead of copying it. NFC. Modified: cfe/trunk/lib/Tooling/Tooling.cpp Modified: cfe/trunk/lib/Tooling/Tooling.cpp URL: http://llv

[PATCH] D44931: [WebAssembly] Use Windows EH instructions for Wasm EH

2018-03-27 Thread Heejin Ahn via Phabricator via cfe-commits
aheejin created this revision. aheejin added reviewers: majnemer, dschuff. Herald added subscribers: cfe-commits, sunfish, jgravelle-google, sbc100, jfb. Because wasm control flow needs to be structured, using WinEH instructions to support wasm EH brings several benefits. This patch makes wasm EH

[PATCH] D44931: [WebAssembly] Use Windows EH instructions for Wasm EH

2018-03-27 Thread Heejin Ahn via Phabricator via cfe-commits
aheejin updated this revision to Diff 139920. aheejin added a comment. - Comment fix Repository: rC Clang https://reviews.llvm.org/D44931 Files: lib/CodeGen/CGCXXABI.h lib/CodeGen/CGCleanup.cpp lib/CodeGen/CGCleanup.h lib/CodeGen/CGException.cpp lib/CodeGen/ItaniumCXXABI.cpp lib/

[PATCH] D44932: [CodeComplete] Fix completion in the middle of ident in ctor lists.

2018-03-27 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov created this revision. ilya-biryukov added reviewers: sammccall, aaron.ballman, bkramer, sepavloff. The example that was broken before (^ designate completion points): class Foo { Foo() : fie^ld^() {} // no completions were provided here. int field; }; To fix it we don'

[PATCH] D44480: [Sema] Don't skip function bodies with 'auto' without trailing return type

2018-03-27 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov updated this revision to Diff 139926. ilya-biryukov added a comment. - Replace auto with explicit type Repository: rC Clang https://reviews.llvm.org/D44480 Files: lib/Sema/SemaDecl.cpp test/CodeCompletion/crash-skipped-bodies-template-inst.cpp Index: test/CodeCompletion/c

[PATCH] D44480: [Sema] Don't skip function bodies with 'auto' without trailing return type

2018-03-27 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov marked an inline comment as done. ilya-biryukov added a comment. I hit that bug in practice a few days ago when playing around with a C++17 codebase. It makes completion totally unusable when functions with auto-deduced return type are used. @rsmith, any chance you could take a loo

[PATCH] D44934: [analyzer] Improve the modeling of `memset()`.

2018-03-27 Thread Henry Wong via Phabricator via cfe-commits
MTC created this revision. MTC added reviewers: dcoughlin, NoQ, xazax.hun, a.sidorin. Herald added subscribers: cfe-commits, rnkovacs, szepet. Herald added a reviewer: george.karpenkov. This patch originates from https://reviews.llvm.org/D31868. There are two key points in this patch: - Add `Ov

[PATCH] D44831: [clang-format] Refine ObjC guesser to handle child lines of child lines

2018-03-27 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton updated this revision to Diff 139929. benhamilton marked 2 inline comments as done. benhamilton added a comment. - Simplify recursion. Remove static method LineContainsObjCCode(). Repository: rC Clang https://reviews.llvm.org/D44831 Files: lib/Format/Format.cpp unittests/Form

[PATCH] D44831: [clang-format] Refine ObjC guesser to handle child lines of child lines

2018-03-27 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton added inline comments. Comment at: lib/Format/Format.cpp:1449 const AdditionalKeywords &Keywords) { +for (auto Line : AnnotatedLines) + if (LineContainsObjCCode(*Line, Keywords)) djasper wrote: > I would not create

[PATCH] D44816: [clang-format] Do not insert space before closing brace in ObjC dict literal

2018-03-27 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton updated this revision to Diff 139930. benhamilton marked an inline comment as done. benhamilton added a comment. - Use `Right.MatchingParen->endsSequence(TT_DictLiteral, tok::at)` Repository: rC Clang https://reviews.llvm.org/D44816 Files: lib/Format/TokenAnnotator.cpp unitte

[PATCH] D44816: [clang-format] Do not insert space before closing brace in ObjC dict literal

2018-03-27 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton added inline comments. Comment at: lib/Format/TokenAnnotator.cpp:2484 + if (Right.is(tok::r_brace) && Right.MatchingParen && + Right.MatchingParen->is(TT_DictLiteral) && + Right.MatchingParen->Previous && djasper wrote: > Could you use Righ

[PATCH] D44831: [clang-format] Refine ObjC guesser to handle child lines of child lines

2018-03-27 Thread Daniel Jasper via Phabricator via cfe-commits
djasper accepted this revision. djasper added a comment. This revision is now accepted and ready to land. Looks good. Repository: rC Clang https://reviews.llvm.org/D44831 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.o

[PATCH] D44816: [clang-format] Do not insert space before closing brace in ObjC dict literal

2018-03-27 Thread Daniel Jasper via Phabricator via cfe-commits
djasper accepted this revision. djasper added a comment. Yeah, it's one of these things where neither way would be totally intuitive to everyone. Repository: rC Clang https://reviews.llvm.org/D44816 ___ cfe-commits mailing list cfe-commits@lists

r328626 - Drop spurious break; NFC

2018-03-27 Thread Sven van Haastregt via cfe-commits
Author: svenvh Date: Tue Mar 27 07:57:56 2018 New Revision: 328626 URL: http://llvm.org/viewvc/llvm-project?rev=328626&view=rev Log: Drop spurious break; NFC Modified: cfe/trunk/lib/Sema/SemaChecking.cpp Modified: cfe/trunk/lib/Sema/SemaChecking.cpp URL: http://llvm.org/viewvc/llvm-project/

r328628 - [clang-format] Refine ObjC guesser to handle child lines of child lines

2018-03-27 Thread Ben Hamilton via cfe-commits
Author: benhamilton Date: Tue Mar 27 08:01:21 2018 New Revision: 328628 URL: http://llvm.org/viewvc/llvm-project?rev=328628&view=rev Log: [clang-format] Refine ObjC guesser to handle child lines of child lines Summary: This fixes an issue brought up by djasper@ in his review of D44790. We handled

r328627 - [clang-format] Do not insert space before closing brace in ObjC dict literal

2018-03-27 Thread Ben Hamilton via cfe-commits
Author: benhamilton Date: Tue Mar 27 08:01:17 2018 New Revision: 328627 URL: http://llvm.org/viewvc/llvm-project?rev=328627&view=rev Log: [clang-format] Do not insert space before closing brace in ObjC dict literal Summary: Previously, `clang-format` would sometimes insert a space before the clos

[PATCH] D44816: [clang-format] Do not insert space before closing brace in ObjC dict literal

2018-03-27 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton added a comment. I filed https://bugs.llvm.org/show_bug.cgi?id=36919 to follow up and make ObjC dictionary literal spacing consistent with ObjC array literals. Repository: rC Clang https://reviews.llvm.org/D44816 ___ cfe-commits mail

[PATCH] D44816: [clang-format] Do not insert space before closing brace in ObjC dict literal

2018-03-27 Thread Ben Hamilton via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC328627: [clang-format] Do not insert space before closing brace in ObjC dict literal (authored by benhamilton, committed by ). Changed prior to commit: https://reviews.llvm.org/D44816?vs=139930&id=13993

[PATCH] D44831: [clang-format] Refine ObjC guesser to handle child lines of child lines

2018-03-27 Thread Ben Hamilton via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC328628: [clang-format] Refine ObjC guesser to handle child lines of child lines (authored by benhamilton, committed by ). Changed prior to commit: https://reviews.llvm.org/D44831?vs=139929&id=139932#toc

[PATCH] D44908: [ObjC++] Make parameter passing and function return compatible with ObjC

2018-03-27 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak updated this revision to Diff 139935. ahatanak added a comment. Make ClangABICompat a LangOption and remove ForcePassIndirectly. Move the logic in CodeGen that decides whether a parameter should be passed indirectly to Sema. Repository: rC Clang https://reviews.llvm.org/D44908 File

[PATCH] D44906: [clang-tidy] Define __clang_analyzer__ macro for clang-tidy for compatibility with clang static analyzer

2018-03-27 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added inline comments. Comment at: clang-tidy/ClangTidy.cpp:490 +CommandLineArguments AdjustedArgs = Args; +AdjustedArgs.emplace_back("-D__clang_analyzer__"); +return AdjustedArgs; I wonder whether we should instead reuse the logic

[PATCH] D44906: [clang-tidy] Define __clang_analyzer__ macro for clang-tidy for compatibility with clang static analyzer

2018-03-27 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis added inline comments. Comment at: clang-tidy/ClangTidy.cpp:490 +CommandLineArguments AdjustedArgs = Args; +AdjustedArgs.emplace_back("-D__clang_analyzer__"); +return AdjustedArgs; alexfh wrote: > I wonder whether we should inst

[PATCH] D35068: [analyzer] Detect usages of unsafe I/O functions

2018-03-27 Thread Daniel Kolozsvari via Phabricator via cfe-commits
koldaniel added a comment. Do you have any other comments, or could this change be accepted? https://reviews.llvm.org/D35068 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D44916: [Sema] Avoid crash for category implementation without interface

2018-03-27 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. I think that's a fine place to add the check. Repository: rC Clang https://reviews.llvm.org/D44916 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D44826: Add -Wunused-using, a warning that finds unused using declarations.

2018-03-27 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added a comment. You mention a missed case in the description - where the target of a using decl is used and that causes the unused-using not to warn about the using decl? That seems like a big limitation. Does that mean the 'used' bit is being tracked in the wrong place, on the target

[PATCH] D44908: [ObjC++] Make parameter passing and function return compatible with ObjC

2018-03-27 Thread John McCall via Phabricator via cfe-commits
rjmccall accepted this revision. rjmccall added a comment. This revision is now accepted and ready to land. LGTM. Repository: rC Clang https://reviews.llvm.org/D44908 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/c

r328636 - [clang] Change std::sort to llvm::sort in response to r327219

2018-03-27 Thread Mandeep Singh Grang via cfe-commits
Author: mgrang Date: Tue Mar 27 09:50:00 2018 New Revision: 328636 URL: http://llvm.org/viewvc/llvm-project?rev=328636&view=rev Log: [clang] Change std::sort to llvm::sort in response to r327219 r327219 added wrappers to std::sort which randomly shuffle the container before sorting. This will he

[PATCH] D44883: [Sema] Extend -Wself-assign and -Wself-assign-field to warn on overloaded self-assignment (classes)

2018-03-27 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri updated this revision to Diff 139948. lebedev.ri retitled this revision from "[Sema] Extend -Wself-assign with -Wself-assign-overloaded to warn on overloaded self-assignment (classes)" to "[Sema] Extend -Wself-assign and -Wself-assign-field to warn on overloaded self-assignment (class

[PATCH] D44559: [Sema] Wrong width of result of mul operation

2018-03-27 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. In https://reviews.llvm.org/D44559#1049049, @avt77 wrote: > > If that operation overflows, so be it — we're not going to warn about the > > potential for overflow every time the user adds two ints, and by the same > > token, it doesn't make any sense to warn about ever

[PATCH] D33844: [clang-tidy] terminating continue check

2018-03-27 Thread Daniel Kolozsvari via Phabricator via cfe-commits
koldaniel updated this revision to Diff 139953. https://reviews.llvm.org/D33844 Files: clang-tidy/misc/CMakeLists.txt clang-tidy/misc/MiscTidyModule.cpp clang-tidy/misc/TerminatingContinueCheck.cpp clang-tidy/misc/TerminatingContinueCheck.h docs/clang-tidy/checks/list.rst docs/clang-t

[PATCH] D37115: [coroutines] Do not attempt to typo-correct when coroutine is looking for required members

2018-03-27 Thread Brian Gesiak via Phabricator via cfe-commits
modocache accepted this revision. modocache added a comment. This revision is now accepted and ready to land. Excellent, thanks! https://reviews.llvm.org/D37115 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/ma

r328641 - Update test after r328635 in LLVM

2018-03-27 Thread Krzysztof Parzyszek via cfe-commits
Author: kparzysz Date: Tue Mar 27 10:17:39 2018 New Revision: 328641 URL: http://llvm.org/viewvc/llvm-project?rev=328641&view=rev Log: Update test after r328635 in LLVM Modified: cfe/trunk/test/CodeGen/alias.c Modified: cfe/trunk/test/CodeGen/alias.c URL: http://llvm.org/viewvc/llvm-project

[PATCH] D44189: [RISCV] Verify the input value of -march=

2018-03-27 Thread Ana Pazos via Phabricator via cfe-commits
apazos added inline comments. Comment at: lib/Driver/ToolChains/Arch/RISCV.cpp:51 + break; +case 'g': + // g = imafd One more question - how about non-standard extensions (vendor/custom) prefixed with X? Shouldn't we add the logic to process 'Xext'

[PATCH] D44788: Add an option to support debug fission on implicit ThinLTO.

2018-03-27 Thread Yunlian Jiang via Phabricator via cfe-commits
yunlian updated this revision to Diff 139956. https://reviews.llvm.org/D44788 Files: docs/ClangCommandLineReference.rst include/clang/Driver/Options.td lib/Driver/ToolChains/CommonArgs.cpp test/Driver/lto-dwo.c Index: lib/Driver/ToolChains/CommonArgs.cpp

[PATCH] D44815: [AArch64]: Add support for parsing rN registers.

2018-03-27 Thread Peter Smith via Phabricator via cfe-commits
peter.smith added a comment. Thanks for the clarification. With that in mind I'm much less concerned that adding "r" as an alias will make extra warnings more difficult. I agree that there should be at least a warning for register long x asm ("wn") although that is separate from this patch. Ha

[PATCH] D44727: [RISCV] Implement getTargetDefines, handleTargetFeatures and hasFeature for RISCVTargetInfo

2018-03-27 Thread Ana Pazos via Phabricator via cfe-commits
apazos added inline comments. Comment at: test/Preprocessor/riscv-target-features.c:9 + +// RUN: %clang -target riscv32-unknown-linux-gnu -march=rv32im -x c -E -dM %s -o - | FileCheck --check-prefix=CHECK-M-EXT %s +// RUN: %clang -target riscv64-unknown-linux-gnu -march=rv64im -

[PATCH] D33844: [clang-tidy] terminating continue check

2018-03-27 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added inline comments. Comment at: test/clang-tidy/misc-terminating-continue.cpp:7 +// CHECK-MESSAGES: :[[@LINE-1]]:5: warning: terminating 'continue' [misc-terminating-continue] + } while(false); + Quuxplusone wrote: > I initially expected to see

[clang-tools-extra] r328645 - Attempt to fix clangd test on Windows by wildcarding drive letters

2018-03-27 Thread Reid Kleckner via cfe-commits
Author: rnk Date: Tue Mar 27 10:44:12 2018 New Revision: 328645 URL: http://llvm.org/viewvc/llvm-project?rev=328645&view=rev Log: Attempt to fix clangd test on Windows by wildcarding drive letters Modified: clang-tools-extra/trunk/test/clangd/textdocument-didchange-fail.test Modified: clang-

Re: [clang-tools-extra] r328500 - [clangd] Support incremental document syncing

2018-03-27 Thread Reid Kleckner via cfe-commits
One of these new tests does not pass on Windows due to assumptions about absolute path structure. The FileCheck output seems self-explanatory: $ "FileCheck" "-strict-whitespace" "C:\b\slave\clang-x86-windows-msvc2015\clang-x86-windows-msvc2015\llvm\tools\clang\tools\extra\test\clangd\textdocument-

[PATCH] D44883: [Sema] Extend -Wself-assign and -Wself-assign-field to warn on overloaded self-assignment (classes)

2018-03-27 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: lib/Sema/SemaExpr.cpp:12093 +break; + } + I think doing this here can result in double-warning if the overload resolves to a builtin operator. Now, it might not actually be possible for that to combine with the

[PATCH] D44888: [RISCV] Default enable linker relaxation and add -mno-relax flag to disable it

2018-03-27 Thread Ana Pazos via Phabricator via cfe-commits
apazos added inline comments. Comment at: include/clang/Driver/Options.td:1874 +def mno_relax : Flag<["-"], "mno-relax">, +Group; I think we should define both -mrelax and -mno-relax flags Comment at: lib/Driver/ToolChains/Arch/RISCV.cpp:

[PATCH] D43322: Diagnose cases of "return x" that should be "return std::move(x)" for efficiency

2018-03-27 Thread Arthur O'Dwyer via Phabricator via cfe-commits
Quuxplusone updated this revision to Diff 139961. Quuxplusone edited the summary of this revision. Quuxplusone added a comment. Rebased on master. AFAIK this is ready to go and I just need someone to land it for me... @rtrieu ping? I believe the PR summary would be suitable as a commit message.

[PATCH] D35068: [analyzer] Detect usages of unsafe I/O functions

2018-03-27 Thread George Karpenkov via Phabricator via cfe-commits
george.karpenkov added a comment. @koldaniel Have you evaluated this checker? On which codebases? Were the warnings real security issues, or were they mostly spurious? The code seems fine, but I'm not sure whether it should be in `security` or in `alpha`. https://reviews.llvm.org/D35068 ___

[PATCH] D43871: [modules] No longer include stdlib.h from mm_malloc.h.

2018-03-27 Thread Raphael Isemann via Phabricator via cfe-commits
teemperor updated this revision to Diff 139963. teemperor added a comment. - Added more test cases for reverse include order and clang modules. https://reviews.llvm.org/D43871 Files: lib/Headers/mm_malloc.h lib/Sema/SemaExceptionSpec.cpp test/CXX/except/except.spec/Inputs/clang/mm_malloc.

[PATCH] D43341: [clang-doc] Implement reducer portion of the frontend framework

2018-03-27 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. It's surprisingly difficult to review this :/ Just by itself the logic is simple, but the amount of blocks/records/record types is kinda demoralizing. I really hope it will be possible to somehow tablegen this later. Comment at: clang-doc/BitcodeRea

r328654 - [Sema] Avoid crash for category implementation without interface

2018-03-27 Thread Shoaib Meenai via cfe-commits
Author: smeenai Date: Tue Mar 27 11:58:28 2018 New Revision: 328654 URL: http://llvm.org/viewvc/llvm-project?rev=328654&view=rev Log: [Sema] Avoid crash for category implementation without interface When we have a category implementation without a corresponding interface (which is an error by its

[PATCH] D44882: [clangd] Implementation of workspace/symbol request

2018-03-27 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle marked 9 inline comments as done. malaperle added a comment. In https://reviews.llvm.org/D44882#1048355, @sammccall wrote: > Can we split this patch up (it's pretty large anyway) and land the > `workspaceSymbols` implementation first, without changing the indexer > behavior? > > I thi

[PATCH] D44916: [Sema] Avoid crash for category implementation without interface

2018-03-27 Thread Shoaib Meenai via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL328654: [Sema] Avoid crash for category implementation without interface (authored by smeenai, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM https://reviews.llvm.org/D449

[PATCH] D44842: Add Parameters to DW_AT_name Attribute of Template Variables

2018-03-27 Thread Matthew Voss via Phabricator via cfe-commits
ormris added inline comments. Comment at: lib/CodeGen/CGDebugInfo.cpp:2992 + std::string NameString = Name.str(); + llvm::raw_string_ostream ParameterizedName(NameString); + ParameterizedName << "<"; JDevlieghere wrote: > Why not use Name.str() dir

[PATCH] D44882: [clangd] Implementation of workspace/symbol request

2018-03-27 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle updated this revision to Diff 139968. malaperle marked 4 inline comments as done. malaperle added a comment. Split the patch so that this part only has the workspace/symbol part and the index model will be updated separately. Repository: rCTE Clang Tools Extra https://reviews.llvm.o

[PATCH] D43341: [clang-doc] Implement reducer portion of the frontend framework

2018-03-27 Thread Julie Hockett via Phabricator via cfe-commits
juliehockett updated this revision to Diff 139972. juliehockett marked 4 inline comments as done. juliehockett added a comment. Small fixes to address comments https://reviews.llvm.org/D43341 Files: clang-doc/BitcodeReader.cpp clang-doc/BitcodeReader.h clang-doc/BitcodeWriter.cpp clang-

[PATCH] D43341: [clang-doc] Implement reducer portion of the frontend framework

2018-03-27 Thread Julie Hockett via Phabricator via cfe-commits
juliehockett added inline comments. Comment at: clang-doc/BitcodeReader.cpp:27 + assert(Record[0] == 20); + for (int I = 0, E = Record[0]; I < E; ++I) +Field[I] = Record[I + 1]; lebedev.ri wrote: > Ok, i don't understand what is going on here. > Where is th

[PATCH] D44723: Set dso_local when clearing dllimport

2018-03-27 Thread Reid Kleckner via Phabricator via cfe-commits
rnk accepted this revision. rnk added a comment. This revision is now accepted and ready to land. lgtm I'd add more tests but I can't think of ways to remove the dll attributes, only to flip them. Do we already have dso_local tests for this similar case: __declspec(dllimport) void f(); voi

[PATCH] D43341: [clang-doc] Implement reducer portion of the frontend framework

2018-03-27 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added inline comments. Comment at: clang-doc/BitcodeWriter.h:129 // Check that the static size is large-enough. assert(Record.capacity() > BitCodeConstants::RecordSize); } juliehockett wrote: > lebedev.ri wrote: > > Isn't that the opposite

[PATCH] D44330: CMake option to allow enabling experimental new pass manager by default

2018-03-27 Thread Petr Hosek via Phabricator via cfe-commits
phosek added inline comments. Comment at: clang/CMakeLists.txt:215 +set(ENABLE_EXPERIMENTAL_NEW_PASS_MANAGER FALSE CACHE BOOL + "Enable the experimental new pass manager by default.") chandlerc wrote: > Does it make sense to put the word `DEFAULT` into the var

[PATCH] D44947: [Driver] Add fuzzer-no-link into the list of supported Fuchsia sanitizers

2018-03-27 Thread Petr Hosek via Phabricator via cfe-commits
phosek created this revision. phosek added reviewers: mcgrathr, aarongreen. Herald added a subscriber: cfe-commits. This is needed in addition to fuzzer in order to use libFuzzer. Repository: rC Clang https://reviews.llvm.org/D44947 Files: clang/lib/Driver/ToolChains/Fuchsia.cpp Index: c

r328657 - AMDGPU: Update datalayout for stack alignment

2018-03-27 Thread Matt Arsenault via cfe-commits
Author: arsenm Date: Tue Mar 27 12:26:51 2018 New Revision: 328657 URL: http://llvm.org/viewvc/llvm-project?rev=328657&view=rev Log: AMDGPU: Update datalayout for stack alignment Modified: cfe/trunk/lib/Basic/Targets/AMDGPU.cpp cfe/trunk/test/CodeGen/target-data.c cfe/trunk/test/CodeG

[PATCH] D44589: [Sema] Make deprecation fix-it replace all multi-parameter ObjC method slots.

2018-03-27 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai updated this revision to Diff 139981. vsapsai added a comment. - More tweaks. Remove MultiSourceLocation as nobobody, including me, sees much value in it. https://reviews.llvm.org/D44589 Files: clang/include/clang/Basic/CharInfo.h clang/include/clang/Sema/DelayedDiagnostic.h clan

[PATCH] D44948: Add diagnostic -Waggregate-ctors, "aggregate type has user-declared constructors"

2018-03-27 Thread Arthur O'Dwyer via Phabricator via cfe-commits
Quuxplusone created this revision. Herald added a subscriber: cfe-commits. This new warning diagnoses any aggregate class/struct/union type which has user-declared constructors, in order to test the hypothesis that real code does not (intentionally) contain such animals. If no real code

[PATCH] D44747: Set calling convention for CUDA kernel

2018-03-27 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl marked 3 inline comments as done. yaxunl added inline comments. Comment at: lib/Sema/SemaOverload.cpp:1492 + Changed = true; +} + rjmccall wrote: > It's cheaper not to check the CUDA language mode here; pulling the CC out of > the FPT is easy. >

[PATCH] D44882: [clangd] Implementation of workspace/symbol request

2018-03-27 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. > Have you considered also allowing '.' and ' ' (space) as separators in the > request? Having additional separators doesn't really hurt complexity of the > implementation, but allows to switch between tools for different languages > easier. I would suggest allowing pa

[PATCH] D44747: Set calling convention for CUDA kernel

2018-03-27 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: lib/Sema/SemaOverload.cpp:1492 + Changed = true; +} + yaxunl wrote: > rjmccall wrote: > > It's cheaper not to check the CUDA language mode here; pulling the CC out > > of the FPT is easy. > > > > Why is this

[PATCH] D44927: Enable msan unconditionally on Linux

2018-03-27 Thread Evgenii Stepanov via Phabricator via cfe-commits
eugenis added a subscriber: kcc. eugenis added a comment. I too find these checks arbitrary and pointless. @kcc ? Repository: rC Clang https://reviews.llvm.org/D44927 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/c

[PATCH] D44882: [clangd] Implementation of workspace/symbol request

2018-03-27 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clangd/tool/ClangdMain.cpp:105 +static llvm::cl::opt LimitWorkspaceSymbolResult( +"workspace-symbol-limit", malaperle wrote: > sammccall wrote: > > the -completion-limit was mostly to control rollout, I'm not sure

[PATCH] D44765: PR36643 Make clang-format support more generic TMarcos

2018-03-27 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added a comment. I don't have preferences over names, but I agree with Alex that the option should have more detailed description. Comment at: lib/Format/FormatToken.h:138 + /// \brief Whether this is a string literal similar to _T("sdfsdf"). + bool TMacroStringLite

[PATCH] D44947: [Driver] Add fuzzer-no-link into the list of supported Fuchsia sanitizers

2018-03-27 Thread Roland McGrath via Phabricator via cfe-commits
mcgrathr accepted this revision. mcgrathr added a comment. This revision is now accepted and ready to land. lgtm Repository: rC Clang https://reviews.llvm.org/D44947 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cg

[PATCH] D42034: [clang-format] In tests, expected code should be format-stable

2018-03-27 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. Thank you! If this works, we should apply it to all files in `unittest/Format`. Repository: rC Clang https://reviews.llvm.org/D42034 ___

r328663 - [coroutines] Do not attempt to typo-correct when coroutine is looking for required members

2018-03-27 Thread Gor Nishanov via cfe-commits
Author: gornishanov Date: Tue Mar 27 13:38:19 2018 New Revision: 328663 URL: http://llvm.org/viewvc/llvm-project?rev=328663&view=rev Log: [coroutines] Do not attempt to typo-correct when coroutine is looking for required members When SemaCoroutine looks for await_resume, it means it. No need for

[PATCH] D44954: [clangd] [RFC] Add more symbols to the index

2018-03-27 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle created this revision. Herald added subscribers: cfe-commits, MaskRay, ioeric, jkorous-apple, ilya-biryukov, klimek. This adds more symbols to the index: - member variables and functions - symbols in main files - enum constants in scoped enums This is a WIP meant as a starting point f

[PATCH] D44955: [CFG] [analyzer] Work around a disappearing CXXBindTemporaryExpr.

2018-03-27 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ created this revision. NoQ added reviewers: dcoughlin, xazax.hun, a.sidorin, george.karpenkov, szepet. Herald added subscribers: cfe-commits, rnkovacs. This is a CFG-side patch for the weird AST i encountered in http://lists.llvm.org/pipermail/cfe-dev/2018-March/057398.html . The omission of

[PATCH] D44954: [clangd] [RFC] Add more symbols to the index

2018-03-27 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle planned changes to this revision. malaperle added inline comments. Comment at: clangd/index/Index.h:142 + // Whether or not the symbol should be considered for completion. + bool ForCompletion = false; /// A brief description of the symbol that can be displayed in

[PATCH] D44882: [clangd] Implementation of workspace/symbol request

2018-03-27 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle added a comment. The index changes are moved here: https://reviews.llvm.org/D44954 I haven't changed the patch yet though, I just removed it from this one. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D44882 ___ cfe-comm

r328671 - [Sema] Emit -Winteger-overflow for arguments in function calls, ObjC messages.

2018-03-27 Thread Volodymyr Sapsai via cfe-commits
Author: vsapsai Date: Tue Mar 27 14:29:05 2018 New Revision: 328671 URL: http://llvm.org/viewvc/llvm-project?rev=328671&view=rev Log: [Sema] Emit -Winteger-overflow for arguments in function calls, ObjC messages. rdar://problem/35539384 Reviewers: ahatanak, nicholas, rsmith, jkorous-apple Revie

[PATCH] D42938: [Sema] Emit -Winteger-overflow for arguments in function calls, ObjC messages.

2018-03-27 Thread Volodymyr Sapsai via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL328671: [Sema] Emit -Winteger-overflow for arguments in function calls, ObjC messages. (authored by vsapsai, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://rev

r328672 - [Driver] Add fuzzer-no-link into the list of supported Fuchsia sanitizers

2018-03-27 Thread Petr Hosek via cfe-commits
Author: phosek Date: Tue Mar 27 14:33:12 2018 New Revision: 328672 URL: http://llvm.org/viewvc/llvm-project?rev=328672&view=rev Log: [Driver] Add fuzzer-no-link into the list of supported Fuchsia sanitizers This is needed in addition to fuzzer in order to use libFuzzer. Differential Revision: ht

[PATCH] D44947: [Driver] Add fuzzer-no-link into the list of supported Fuchsia sanitizers

2018-03-27 Thread Petr Hosek via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC328672: [Driver] Add fuzzer-no-link into the list of supported Fuchsia sanitizers (authored by phosek, committed by ). Changed prior to commit: https://reviews.llvm.org/D44947?vs=139978&id=140007#toc R

[PATCH] D44931: [WebAssembly] Use Windows EH instructions for Wasm EH

2018-03-27 Thread David Majnemer via Phabricator via cfe-commits
majnemer added a comment. Some quick first pass comments. Comment at: lib/CodeGen/CGCleanup.cpp:985 +// does not have a runtime support for that. +if (!Personality.usesFuncletPads() || Personality.isWasmPersonality()) { + EHStack.pushTerminate(); I

[PATCH] D44765: PR36643 Make clang-format support more generic TMarcos

2018-03-27 Thread Teodor Petrov via Phabricator via cfe-commits
obfuscated marked an inline comment as done. obfuscated added inline comments. Comment at: lib/Format/FormatToken.h:138 + /// \brief Whether this is a string literal similar to _T("sdfsdf"). + bool TMacroStringLiteral = false; + krasimir wrote: > We don't stric

  1   2   >