[PATCH] D88281: [clangd] Use Decision Forest to score code compeltions.

2020-09-25 Thread Utkarsh Saxena via Phabricator via cfe-commits
usaxena95 created this revision. Herald added subscribers: cfe-commits, kadircet, arphaman, mgrang. Herald added a project: clang. usaxena95 requested review of this revision. Herald added subscribers: MaskRay, ilya-biryukov. By default clangd scores a code completion item using heuristic model. S

[PATCH] D77229: [Analyzer][NFC] Avoid handling of LazyCompundVals in IteratorModeling

2020-09-25 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware added a comment. @gamesh411, @whisperity, @martong and others, please suggest me new test cases if you think the current ones are not enough. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77229/new/ https://reviews.llvm.org/D77229 ___

[PATCH] D80791: [AArch64] Generate .note.gnu.property based on module flags.

2020-09-25 Thread Momchil Velikov via Phabricator via cfe-commits
chill requested changes to this revision. chill added a comment. This revision now requires changes to proceed. In D85649 I changed the module flags to be always present and have a zero/non-zero value. That's needed during LTO, if a flag is present in one module

[PATCH] D87146: [analyzer] Implement shared semantics checks for XNU functions in PthreadLockChecker

2020-09-25 Thread Denys Petrov via Phabricator via cfe-commits
ASDenysPetrov added a comment. It would be nice if someone had time to look at this. Thanks. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D87146/new/ https://reviews.llvm.org/D87146 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http

[PATCH] D87528: Enable '#pragma STDC FENV_ACCESS' in frontend cf. D69272 - Work in Progress

2020-09-25 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added inline comments. Comment at: clang/test/CodeGen/fp-floatcontrol-pragma.cpp:154 + if (i<0) + return 1.0 + 2.0; + // Check that floating point constant folding doesn't occur if In this particular case we know for sure that the result does not dep

[PATCH] D88154: Initial support for vectorization using Libmvec (GLIBC vector math library).

2020-09-25 Thread Renato Golin via Phabricator via cfe-commits
rengolin added inline comments. Comment at: clang/include/clang/Driver/Options.td:1564 def fveclib : Joined<["-"], "fveclib=">, Group, Flags<[CC1Option]>, -HelpText<"Use the given vector functions library">, Values<"Accelerate,MASSV,SVML,none">; +HelpText<"Use the given

[PATCH] D88265: Fix comma with half vectors.

2020-09-25 Thread Florian Hahn via Phabricator via cfe-commits
fhahn added inline comments. Comment at: clang/lib/Sema/SemaExpr.cpp:13936 // arm64). - assert(isVector(RHS.get()->getType(), Context.HalfTy) == - isVector(LHS.get()->getType(), Context.HalfTy) && - "both sides are half vectors or neither sides are"); + asser

[PATCH] D87972: [OldPM] Pass manager: run SROA after (simple) loop unrolling

2020-09-25 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. @MaskRay, @dmgreen & @sanwou01 thank you for running perf experiment! I think all the results are consistent along the lines of "this sounds generally reasonable (esp. given that new-pm does it already), as usual results in ups&downs, but seems to be a (small) geomean

[PATCH] D87972: [OldPM] Pass manager: run SROA after (simple) loop unrolling

2020-09-25 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. >> Does that sound reasonable? Yes IMHO. >> What are the next suggested steps? It would be great to isolate and check the cases which regressed a bit. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D87972/new/ https://rev

[PATCH] D77062: [analyzer] Improve zero assumption in CStringChecke::assumeZero

2020-09-25 Thread Balázs Benics via Phabricator via cfe-commits
steakhal added a comment. Finally, I made my investigations and I come up with this code: void strcpy(char *, char *); void test(int *a, char ***b) { *(unsigned char **)b = (unsigned char*)a; // #1 if (**b == nullptr) // will-crash ; } So, this issue does not relate to CStrin

[PATCH] D87146: [analyzer] Implement shared semantics checks for XNU functions in PthreadLockChecker

2020-09-25 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware added a comment. In D87146#2294423 , @ASDenysPetrov wrote: > It would be nice if someone had time to look at this. Thanks. I am just looking, but I am not a `pthread` expert. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D8714

[PATCH] D77062: [analyzer] Improve zero assumption in CStringChecke::assumeZero

2020-09-25 Thread Balázs Benics via Phabricator via cfe-commits
steakhal added a comment. And of course, repro: ./bin/clang -cc1 -analyze -setup-static-analyzer -analyzer-checker=core example.c Assertion `op == BO_Add' failed #0 0x7f5bea743904 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) /home/elnbbea/git/llvm-project/build/debug/../

[PATCH] D77062: [analyzer] Improve zero assumption in CStringChecke::assumeZero

2020-09-25 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. Beware, Phabricator ruins the visual experience of this nice analysis. E.g `//char ***//` is visible as an italic `char *`. > I think we should have a symbolic cast back to the static type before doing > anything with the SVal (iff the BaseKind differs). > If we do this

[PATCH] D77062: [analyzer] Improve zero assumption in CStringChecke::assumeZero

2020-09-25 Thread Balázs Benics via Phabricator via cfe-commits
steakhal added a comment. In D77062#2294516 , @martong wrote: > Though, the fix probably will not be simple, because the issue itself always > requires a 3x indirection. The code that is presented by @steakhal is the > least minimal example to get this c

[PATCH] D87043: [Analyzer] Fix for dereferece of smart pointer after branching on unknown inner pointer

2020-09-25 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. Congrats on your GSoC! Unless I missed it, it seems like you haven't posted your final evaluation on cfe-dev, even though its an amazing looking document with a lot of examples and explanations. I think it would be great to spread the message, its a work to be proud o

[PATCH] D68364: Implement C++20's P0784 (More constexpr containers)

2020-09-25 Thread Jonathan Wakely via Phabricator via cfe-commits
jwakely added a comment. In D68364#2293971 , @leonardchan wrote: > Is there a recommended way for working around this? We're using GCC 10.2.1. > Thanks. I don't think your implementation is valid. I think P0784 only allows new-expressions and calls to `

[PATCH] D83144: Allow to specify macro names for android-comparison-in-temp-failure-retry.

2020-09-25 Thread Florian Mayer via Phabricator via cfe-commits
fmayer added a comment. I am not very experienced with Phabricator, but I think this needs another approval for the latest revision :) Thanks in advance! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D83144/new/ https://reviews.llvm.org/D83144 __

[PATCH] D85649: [AArch64] PAC/BTI code generation for LLVM generated functions

2020-09-25 Thread Momchil Velikov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGa88c722e687e: [AArch64] PAC/BTI code generation for LLVM generated functions (authored by chill). Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monore

[clang] a88c722 - [AArch64] PAC/BTI code generation for LLVM generated functions

2020-09-25 Thread Momchil Velikov via cfe-commits
Author: Momchil Velikov Date: 2020-09-25T11:47:14+01:00 New Revision: a88c722e687e6780dcd6a58718350dc76fcc4cc9 URL: https://github.com/llvm/llvm-project/commit/a88c722e687e6780dcd6a58718350dc76fcc4cc9 DIFF: https://github.com/llvm/llvm-project/commit/a88c722e687e6780dcd6a58718350dc76fcc4cc9.dif

[PATCH] D87972: [OldPM] Pass manager: run SROA after (simple) loop unrolling

2020-09-25 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. In D87972#2294488 , @xbolva00 wrote: >>> Does that sound reasonable? > > Yes IMHO. > >>> What are the next suggested steps? > > It would be great to isolate and check the cases which regressed a bit. I've rerun my benchmark, an

[clang] facad21 - [Analyzer] Fix for `ExprEngine::computeObjectUnderConstruction()` for base and delegating consturctor initializers

2020-09-25 Thread Adam Balogh via cfe-commits
Author: Adam Balogh Date: 2020-09-25T13:28:22+02:00 New Revision: facad21b29839a08fdf448eb4dd5a4e31e293b9b URL: https://github.com/llvm/llvm-project/commit/facad21b29839a08fdf448eb4dd5a4e31e293b9b DIFF: https://github.com/llvm/llvm-project/commit/facad21b29839a08fdf448eb4dd5a4e31e293b9b.diff L

[PATCH] D85351: [Analyzer] Fix for `ExprEngine::computeObjectUnderConstruction()` for base and delegating consturctor initializers

2020-09-25 Thread Balogh , Ádám via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. baloghadamsoftware marked an inline comment as done. Closed by commit rGfacad21b2983: [Analyzer] Fix for `ExprEngine::computeObjectUnderConstruction()` for base and… (authored by baloghadamsoftware). Changed prior to commi

[PATCH] D84176: [CMake][CTE] Add "check-clang-extra-..." targets to test only a particular Clang extra tool

2020-09-25 Thread Whisperity via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG9d2ef5e74eea: [CMake][CTE] Add "check-clang-extra-..." targets to test only a particular… (authored by whisperity). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm

[clang-tools-extra] 9d2ef5e - [CMake][CTE] Add "check-clang-extra-..." targets to test only a particular Clang extra tool

2020-09-25 Thread via cfe-commits
Author: Whisperity Date: 2020-09-25T13:32:56+02:00 New Revision: 9d2ef5e74eea2247657431f44152f1f83ed99b84 URL: https://github.com/llvm/llvm-project/commit/9d2ef5e74eea2247657431f44152f1f83ed99b84 DIFF: https://github.com/llvm/llvm-project/commit/9d2ef5e74eea2247657431f44152f1f83ed99b84.diff LO

[PATCH] D84306: [clang-format][NFC] Be more careful about the layout of FormatToken.

2020-09-25 Thread Manuel Klimek via Phabricator via cfe-commits
klimek added a comment. FWIW, finding this due to seeing the added complexity. Do you have data on what the difference is on clang-format for either overall memory use or performance? Thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D84306/new

[PATCH] D88130: [PPC] [AIX] Implement calling convention IR for C99 complex types on AIX

2020-09-25 Thread Zarko Todorovski via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGf330d9f163f6: [PPC] [AIX] Implement calling convention IR for C99 complex types on AIX (authored by cebowleratibm, committed by ZarkoCA). Changed pr

[clang] f330d9f - [PPC] [AIX] Implement calling convention IR for C99 complex types on AIX

2020-09-25 Thread Zarko Todorovski via cfe-commits
Author: Chris Bowler Date: 2020-09-25T07:43:31-04:00 New Revision: f330d9f163f644b968c6aa5884dc1be5efda20a1 URL: https://github.com/llvm/llvm-project/commit/f330d9f163f644b968c6aa5884dc1be5efda20a1 DIFF: https://github.com/llvm/llvm-project/commit/f330d9f163f644b968c6aa5884dc1be5efda20a1.diff

[PATCH] D87030: Adapt CastExpr::getSubExprAsWritten to ConstantExpr

2020-09-25 Thread Stephan Bergmann via Phabricator via cfe-commits
sberg added a comment. ping^2 CHANGES SINCE LAST ACTION https://reviews.llvm.org/D87030/new/ https://reviews.llvm.org/D87030 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D88281: [clangd] Use Decision Forest to score code compeltions.

2020-09-25 Thread Utkarsh Saxena via Phabricator via cfe-commits
usaxena95 updated this revision to Diff 294281. usaxena95 added a comment. Moved DF evaluation to Quality.cpp Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D88281/new/ https://reviews.llvm.org/D88281 Files: clang-tools-extra/clangd/CodeComplete.c

[PATCH] D87146: [analyzer] Implement shared semantics checks for XNU functions in PthreadLockChecker

2020-09-25 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware added a comment. In D87146#2294514 , @baloghadamsoftware wrote: > In D87146#2294423 , @ASDenysPetrov > wrote: > >> It would be nice if someone had time to look at this. Thanks. > > I am just loo

[PATCH] D83296: [clang-format] Add a MacroExpander.

2020-09-25 Thread Manuel Klimek via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. klimek marked 5 inline comments as done. Closed by commit rGe336b74c995d: [clang-format] Add a MacroExpander. (authored by klimek). Changed prior to commit: https://

[clang] e336b74 - [clang-format] Add a MacroExpander.

2020-09-25 Thread Manuel Klimek via cfe-commits
Author: Manuel Klimek Date: 2020-09-25T14:08:13+02:00 New Revision: e336b74c995d665bc3fb75164375bbb0f78f516c URL: https://github.com/llvm/llvm-project/commit/e336b74c995d665bc3fb75164375bbb0f78f516c DIFF: https://github.com/llvm/llvm-project/commit/e336b74c995d665bc3fb75164375bbb0f78f516c.diff

[clang] 6a1bca8 - [Analyzer] Fix unused variable warning in Release builds

2020-09-25 Thread Benjamin Kramer via cfe-commits
Author: Benjamin Kramer Date: 2020-09-25T14:09:43+02:00 New Revision: 6a1bca8798c6ba119f188061472b60876495b9ae URL: https://github.com/llvm/llvm-project/commit/6a1bca8798c6ba119f188061472b60876495b9ae DIFF: https://github.com/llvm/llvm-project/commit/6a1bca8798c6ba119f188061472b60876495b9ae.dif

[PATCH] D88295: [Sema] Fix volatile check when test if a return object can be implicitly move

2020-09-25 Thread Yang Fan via Phabricator via cfe-commits
nullptr.cpp created this revision. nullptr.cpp added reviewers: Quuxplusone, rsmith, erik.pilkington. Herald added subscribers: cfe-commits, dexonsmith. Herald added a project: clang. nullptr.cpp requested review of this revision. In C++11 standard, to become implicitly movable, the expression in

[PATCH] D80791: [AArch64] Generate .note.gnu.property based on module flags.

2020-09-25 Thread Daniel Kiss via Phabricator via cfe-commits
danielkiss updated this revision to Diff 294284. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80791/new/ https://reviews.llvm.org/D80791 Files: llvm/lib/Target/AArch64/AArch64AsmPrinter.cpp llvm/test/CodeGen/AArch64/note-gnu-property-pac-bti-0.ll llvm/test/CodeGen/AArch64/note-gnu

[PATCH] D88263: Sema: remove unnecessary parameter for SwiftName handling (NFCI)

2020-09-25 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. LGTM! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D88263/new/ https://reviews.llvm.org/D88263 __

[PATCH] D87989: [Flang][Driver] Add InputOutputTest frontend action with new -test-IO flag

2020-09-25 Thread Caroline via Phabricator via cfe-commits
CarolineConcatto updated this revision to Diff 294288. CarolineConcatto added a comment. Herald added subscribers: llvm-commits, hiraditya. Herald added a project: LLVM. Solve review comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D87989/new/

[PATCH] D87449: [clang-tidy] Add new check for SEI CERT rule SIG30-C.

2020-09-25 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware added inline comments. Comment at: clang-tools-extra/clang-tidy/cert/SignalHandlerCheck.cpp:31 +static bool isSystemCall(const FunctionDecl *FD) { + // This check does not work with function calls in std namespace. + if (!FD->isGlobal() || FD->isInStdNamespac

[PATCH] D88295: [Sema] Fix volatile check when test if a return object can be implicitly move

2020-09-25 Thread Arthur O'Dwyer via Phabricator via cfe-commits
Quuxplusone added a comment. (This patch was split out from D88220 at my request.) @nullptr.cpp, please add the regression test from https://godbolt.org/z/5EfK99 . After a test is added, this patch LGTM (but will need approval also from someone else). Your s

[PATCH] D87989: [Flang][Driver] Add InputOutputTest frontend action with new -test-IO flag

2020-09-25 Thread Caroline via Phabricator via cfe-commits
CarolineConcatto marked 23 inline comments as done. CarolineConcatto added a comment. @awarzynski thank you for the review. It is a big patch to review at once. I accepted almost all of your changes. Comment at: flang/test/Flang-Driver/emit-obj.f90:2 ! RUN: not %flang-new %s

[PATCH] D88296: [clang-format] De-duplicate includes with leading or trailing whitespace.

2020-09-25 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius created this revision. curdeius added a reviewer: MyDeveloperDay. Herald added a project: clang. Herald added a subscriber: cfe-commits. curdeius requested review of this revision. This fixes PR46555. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D88296 Files: clang

[PATCH] D87449: [clang-tidy] Add new check for SEI CERT rule SIG30-C

2020-09-25 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tools-extra/clang-tidy/cert/SignalHandlerCheck.cpp:31-33 + // This check does not work with function calls in std namespace. + if (!FD->isGlobal() || FD->isInStdNamespace()) +return false; baloghadamsof

[PATCH] D88297: [clangd] Trivial setter support when moving items to fields

2020-09-25 Thread Nathan James via Phabricator via cfe-commits
njames93 created this revision. njames93 added reviewers: sammccall, kadircet, hokein. Herald added subscribers: cfe-commits, usaxena95, arphaman. Herald added a project: clang. njames93 requested review of this revision. Herald added subscribers: MaskRay, ilya-biryukov. Extend the Trivial setter

[PATCH] D88296: [clang-format] De-duplicate includes with leading or trailing whitespace.

2020-09-25 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius updated this revision to Diff 294291. curdeius added a comment. - Ooops. Revert unwanted test changes. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D88296/new/ https://reviews.llvm.org/D88296 Files: clang/lib/Format/Format.cpp clang/u

[PATCH] D88296: [clang-format] De-duplicate includes with leading or trailing whitespace.

2020-09-25 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius added a comment. Finally I've opted for creating a small revision just fixing this particular bug report. Mind however that the problem is a bit more complex and to solve all possible cases we would need to first reformat the source code, then sort the includes and then again, possibly

[PATCH] D88140: [clang-tidy] Check for sigaction in cert-sig30-c.

2020-09-25 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tools-extra/clang-tidy/cert/SignalHandlerCheck.cpp:91 + hasObjectExpression(ignoringParenImpCasts(declRefExpr( + anyOf(hasType(recordDecl(hasName("sigaction"))), +hasType(pointsTo(recordDecl(hasN

[PATCH] D88298: Fix MaterializeTemporaryExpr's type when its an incomplete array.

2020-09-25 Thread Erich Keane via Phabricator via cfe-commits
erichkeane created this revision. erichkeane added reviewers: rsmith, rjmccall. erichkeane requested review of this revision. Like the VarDecl that gets its type updated based on an init-list, this patch corrects the MaterializeTemporaryExpr's type to make sure it isn't creating an incomplete type

[PATCH] D88298: Fix MaterializeTemporaryExpr's type when its an incomplete array.

2020-09-25 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added inline comments. Comment at: clang/lib/Sema/SemaInit.cpp:8061 + QualType MTETy = Step->Type; + It seemed less intrusive/more reliable to fix this during the init-process, and perhaps would fix a few additional cases. The VarDecl gets upd

[PATCH] D72218: [clang-tidy] new altera kernel name restriction check

2020-09-25 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tools-extra/clang-tidy/altera/KernelNameRestrictionCheck.cpp:53 +void KernelNameRestrictionCheck::registerPPCallbacks( +const SourceManager &SM, Preprocessor *PP, Preprocessor *ModuleExpanderPP) { + PP->addPPCallbacks(

[PATCH] D88299: [clang-format] Add MacroUnexpander.

2020-09-25 Thread Manuel Klimek via Phabricator via cfe-commits
klimek created this revision. klimek added a reviewer: sammccall. Herald added subscribers: cfe-commits, mgorny. Herald added a project: clang. klimek requested review of this revision. MacroUnexpander applies the structural formatting of expanded lines into UnwrappedLines to the corresponding une

[PATCH] D87946: [OpenMP] Add Location Fields to Libomptarget Runtime for Debugging

2020-09-25 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 294296. jhuber6 added a comment. Added definition for the ident_t struct from kmp.h along with a method to extract the source location information. Checking the target outcome now prints the file location if ident_t location is available. Repository: rG

[PATCH] D88297: [clangd] Trivial setter support when moving items to fields

2020-09-25 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. Nice, thanks! Comment at: clang-tools-extra/clangd/Hover.cpp:461 + if (auto *CE = llvm::dyn_cast(RHS->IgnoreCasts())) { +// Make sure we get the version of move wi

[PATCH] D87225: [clangd] When finding refs for a renaming alias, do not return refs to underlying decls

2020-09-25 Thread Haojian Wu via Phabricator via cfe-commits
hokein added inline comments. Comment at: clang-tools-extra/clangd/XRefs.cpp:1150 + if (llvm::isa(D) || llvm::isa(D)) { +Decls = getDeclAtPosition(AST, *CurLoc, + Relations | DeclRelation::Underlying); I think it shou

[PATCH] D88297: [clangd] Trivial setter support when moving items to fields

2020-09-25 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clang-tools-extra/clangd/Hover.cpp:414 // If CMD is one of the forms: // void foo(T arg) { FieldName = arg; } // R foo(T arg) { FieldName = arg; return *this; } can you also update the docs? Co

[PATCH] D65880: [Driver] Move LIBRARY_PATH before user inputs

2020-09-25 Thread Joachim Protze via Phabricator via cfe-commits
protze.joachim added a comment. I still see some clang-specific and system link directories listed in the linker line before the directories from `LIBRARY_PATH`: $ LIBRARY_PATH=test1 /usr/local/clang/bin/clang -Ltest2 -v hello.c "/usr/bin/ld" .../crtbegin.o -Ltest2 -L/usr/lib/gcc/x86_64-re

[PATCH] D88281: [clangd] Use Decision Forest to score code compeltions.

2020-09-25 Thread Adam Czachorowski via Phabricator via cfe-commits
adamcz accepted this revision. adamcz added a comment. This revision is now accepted and ready to land. Could you add a test that sets this flag? Perhaps we can run CodeCompletionTests.cpp twice, once with this flag, once without? Just to exercise these code paths, I think most expectations ther

[PATCH] D88088: WIP [clang] improve accuracy of ExprMutAnalyzer

2020-09-25 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth updated this revision to Diff 294300. JonasToth added a comment. - address review comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D88088/new/ https://reviews.llvm.org/D88088 Files: clang/lib/Analysis/ExprMutationAnalyzer.cpp cl

[PATCH] D88088: WIP [clang] improve accuracy of ExprMutAnalyzer

2020-09-25 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth updated this revision to Diff 294301. JonasToth added a comment. - fix typo that provided wrong argument to AST building Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D88088/new/ https://reviews.llvm.org/D88088 Files: clang/lib/Analysis

[clang] 85cea77 - Typo fix; NFC

2020-09-25 Thread Aaron Ballman via cfe-commits
Author: Aaron Ballman Date: 2020-09-25T10:26:29-04:00 New Revision: 85cea77ecb7f2ca51198ec1ad1d28845e803ee32 URL: https://github.com/llvm/llvm-project/commit/85cea77ecb7f2ca51198ec1ad1d28845e803ee32 DIFF: https://github.com/llvm/llvm-project/commit/85cea77ecb7f2ca51198ec1ad1d28845e803ee32.diff

[PATCH] D87187: [Driver] Perform Linux distribution detection just once

2020-09-25 Thread Dmitry Antipov via Phabricator via cfe-commits
dmantipov updated this revision to Diff 294302. dmantipov marked an inline comment as done. dmantipov added a comment. Well, the problem with tests seems to be a bit wider - tests uses llvm::vfs::InMemoryFileSystem, which is not "real", so detection will return Distro::UnknownDistro anyway. So

[PATCH] D88303: [clang][codegen] Remove the insertion of `correctly-rounded-divide-sqrt-fp-math` fn-attr.

2020-09-25 Thread Michael Liao via Phabricator via cfe-commits
hliao created this revision. hliao added a reviewer: yaxunl. Herald added subscribers: cfe-commits, kerbowa, Anastasia, nhaehnle, jvesely. Herald added a project: clang. hliao requested review of this revision. - `-cl-fp32-correctly-rounded-divide-sqrt` is already handled in a per-instruction man

[PATCH] D88296: [clang-format] De-duplicate includes with leading or trailing whitespace.

2020-09-25 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay accepted this revision. MyDeveloperDay added a comment. This revision is now accepted and ready to land. This LGTM, generally I think clang-format seems to remove trailing spaces anyway so it might be that the duplicate might disappear on the second format. but I'm good with this

[clang] a51d51a - Fix some of the more egregious 80-col and whitespace issues; NFC

2020-09-25 Thread Aaron Ballman via cfe-commits
Author: Aaron Ballman Date: 2020-09-25T10:37:38-04:00 New Revision: a51d51a0d4d72ab423b11da4c5c877bc6e89a580 URL: https://github.com/llvm/llvm-project/commit/a51d51a0d4d72ab423b11da4c5c877bc6e89a580 DIFF: https://github.com/llvm/llvm-project/commit/a51d51a0d4d72ab423b11da4c5c877bc6e89a580.diff

[PATCH] D88303: [clang][codegen] Remove the insertion of `correctly-rounded-divide-sqrt-fp-math` fn-attr.

2020-09-25 Thread Michael Liao via Phabricator via cfe-commits
hliao updated this revision to Diff 294307. hliao added a comment. Remove the irrelevant change on .clang-format. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D88303/new/ https://reviews.llvm.org/D88303 Files: clang/lib/CodeGen/CGCall.cpp clan

[PATCH] D84306: [clang-format][NFC] Be more careful about the layout of FormatToken.

2020-09-25 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. Which bit to you find more complex? adding something to the FormatToken or the use of the `is()` calls? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D84306/new/ https://reviews.llvm.org/D84306 _

[PATCH] D88275: [ASTMatchers] Add matcher `hasParentIgnoringImplicit`.

2020-09-25 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 294312. ymandel added a comment. update dynamic registry and the ast matcher doc. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D88275/new/ https://reviews.llvm.org/D88275 Files: clang/docs/LibASTMatchersRefe

[PATCH] D87528: Enable '#pragma STDC FENV_ACCESS' in frontend cf. D69272 - Work in Progress

2020-09-25 Thread Melanie Blower via Phabricator via cfe-commits
mibintc added a comment. In D87528#2270502 , @sepavloff wrote: >> @sepavloff Is it OK if I continue work on this item? Not sure about the >> protocol when continuing someone else's patch. > > It is OK for me. There is also an action in Phabricator "Comman

[PATCH] D87225: [clangd] When finding refs for a renaming alias, do not return refs to underlying decls

2020-09-25 Thread Nathan Ridge via Phabricator via cfe-commits
nridge added inline comments. Comment at: clang-tools-extra/clangd/XRefs.cpp:1150 + if (llvm::isa(D) || llvm::isa(D)) { +Decls = getDeclAtPosition(AST, *CurLoc, + Relations | DeclRelation::Underlying); hokein wrote: >

[PATCH] D88311: Added llvm-string-referencing check

2020-09-25 Thread Bogdan Serea via Phabricator via cfe-commits
bogser01 created this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. bogser01 requested review of this revision. Clang-tidy pass detecting the use of const std::string& references. Use of llvm::StringRef is recommended in the LLVM Programmer's Manual instead: htt

[PATCH] D87737: Add -fprofile-update={atomic,prefer-atomic,single}

2020-09-25 Thread David Li via Phabricator via cfe-commits
davidxl added a comment. Perhaps also add clang option manual description. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D87737/new/ https://reviews.llvm.org/D87737 ___ cfe-commits mailing list cfe-commit

[PATCH] D88311: Added llvm-string-referencing check

2020-09-25 Thread Bogdan Serea via Phabricator via cfe-commits
bogser01 updated this revision to Diff 294331. bogser01 added a comment. Herald added a subscriber: mgorny. Changed upstream Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D88311/new/ https://reviews.llvm.org/D88311 Files: clang-tools-extra/clang-

[PATCH] D87720: Sema: add support for `__attribute__((__swift_private__))`

2020-09-25 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. LGTM! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D87720/new/ https://reviews.llvm.org/D87720 __

[PATCH] D88312: "ErrorReturn checker" WIP review

2020-09-25 Thread Balázs Kéri via Phabricator via cfe-commits
balazske created this revision. Herald added subscribers: cfe-commits, martong, Charusso, gamesh411, Szelethus, dkrupp. Herald added a reviewer: Szelethus. Herald added a project: clang. balazske requested review of this revision. This is a testing version for the checker that is implemented in D

[PATCH] D72705: [analyzer] Added new checker 'alpha.unix.ErrorReturn'.

2020-09-25 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added a comment. A improved version of the checker is added for further discussion (or should continue here?) and to show the improved checker code. See D88312 . Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org

[PATCH] D88312: "ErrorReturn checker" WIP review

2020-09-25 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added a comment. Here are the results with this checker o

[PATCH] D65880: [Driver] Move LIBRARY_PATH before user inputs

2020-09-25 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In D65880#2294871 , @protze.joachim wrote: > I still see some clang-specific and system link directories listed in the > linker line before the directories from `LIBRARY_PATH`: > > $ LIBRARY_PATH=test1 /usr/local/clang/bin/clan

[PATCH] D88314: Added llvm-string-referencing check

2020-09-25 Thread Bogdan Serea via Phabricator via cfe-commits
bogser01 created this revision. Herald added subscribers: cfe-commits, mgorny. Herald added a project: clang. bogser01 requested review of this revision. Clang-tidy pass detecting the use of const std::string& references. Use of llvm::StringRef is recommended in the LLVM Programmer's Manual inste

[PATCH] D87946: [OpenMP] Add Location Fields to Libomptarget Runtime for Debugging

2020-09-25 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert accepted this revision. jdoerfert added a comment. This revision is now accepted and ready to land. One minor remark from me, otherwise LGTM. @grokos Any concerns or is this OK? Comment at: openmp/libomptarget/src/interface.cpp:73-76 + FATAL_MESSAGE0(1, "fail

[PATCH] D87187: [Driver] Perform Linux distribution detection just once

2020-09-25 Thread Alexandre Ganea via Phabricator via cfe-commits
aganea accepted this revision. aganea added a comment. Makes sense, you cache the commonly taken path, but not the (very uncommon) VFS codepath. LGTM, with some minor comments. Thanks again! Comment at: clang/include/clang/Driver/Distro.h:117 - bool IsOpenSUSE() const { -

[PATCH] D87528: Enable '#pragma STDC FENV_ACCESS' in frontend cf. D69272 - Work in Progress

2020-09-25 Thread Melanie Blower via Phabricator via cfe-commits
mibintc added inline comments. Comment at: clang/test/CodeGen/fp-floatcontrol-pragma.cpp:154 + if (i<0) + return 1.0 + 2.0; + // Check that floating point constant folding doesn't occur if sepavloff wrote: > In this particular case we know for sure that the re

[PATCH] D88275: [ASTMatchers] Add matcher `hasParentIgnoringImplicit`.

2020-09-25 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 294348. ymandel added a comment. Fixed to use more standard type adaptors. Registration now works. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D88275/new/ https://reviews.llvm.org/D88275 Files: clang/docs/L

[clang] 62c3727 - [profile] Add %t LLVM_PROFILE_FILE option to substitute $TMPDIR

2020-09-25 Thread Vedant Kumar via cfe-commits
Author: Vedant Kumar Date: 2020-09-25T09:39:40-07:00 New Revision: 62c372770d2e87f3e882a20d43c6814e6c4fe0f5 URL: https://github.com/llvm/llvm-project/commit/62c372770d2e87f3e882a20d43c6814e6c4fe0f5 DIFF: https://github.com/llvm/llvm-project/commit/62c372770d2e87f3e882a20d43c6814e6c4fe0f5.diff

[PATCH] D87332: [profile] Add %t LLVM_PROFILE_FILE option to substitute $TMPDIR

2020-09-25 Thread Vedant Kumar via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG62c372770d2e: [profile] Add %t LLVM_PROFILE_FILE option to substitute $TMPDIR (authored by vsk). Repository: rG LLVM Github Monorepo CHANGES SINC

[PATCH] D87946: [OpenMP] Add Location Fields to Libomptarget Runtime for Debugging

2020-09-25 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 294352. jhuber6 added a comment. Adding message to build with debugging symbols if source location is not found. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D87946/new/ https://reviews.llvm.org/D87946 Files:

[PATCH] D88319: [AST] Delete broken, unused template.

2020-09-25 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel created this revision. ymandel added a reviewer: gribozavr2. Herald added a project: clang. ymandel requested review of this revision. The `const*` overload of `IgnoreExprNodes` can't compile. Moreover, this didn't turn up because it's unused. There's no obvious fix, so I've deleted it.

[PATCH] D87946: [OpenMP] Add Location Fields to Libomptarget Runtime for Debugging

2020-09-25 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. Should we wait until the next OpenMP LLVM meeting to push this? Comment at: openmp/libomptarget/include/Ident.h:48-51 +auto removePath = [](const std::string &path) { +std::size_t pos = path.rfind('/'); +return path.substr(pos + 1);

[PATCH] D87989: [Flang][Driver] Add InputOutputTest frontend action with new -test-IO flag

2020-09-25 Thread Caroline via Phabricator via cfe-commits
CarolineConcatto updated this revision to Diff 294356. CarolineConcatto added a comment. Rebase on top of master Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D87989/new/ https://reviews.llvm.org/D87989 Files: clang/include/clang/Driver/Options.t

[PATCH] D88297: [clangd] Trivial setter support when moving items to fields

2020-09-25 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 294357. njames93 marked 2 inline comments as done. njames93 added a comment. Updated function doc Fix potential assertion Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D88297/new/ https://reviews.llvm.org/D8829

[PATCH] D88297: [clangd] Trivial setter support when moving items to fields

2020-09-25 Thread Nathan James via Phabricator via cfe-commits
njames93 added inline comments. Comment at: clang-tools-extra/clangd/Hover.cpp:461 + if (auto *CE = llvm::dyn_cast(RHS->IgnoreCasts())) { +// Make sure we get the version of move with 1 arg, the other is for moving +// ranges. sammccall wrote: > nit: you

[clang] 76eb163 - Sema: remove unnecessary parameter for SwiftName handling (NFCI)

2020-09-25 Thread Saleem Abdulrasool via cfe-commits
Author: Saleem Abdulrasool Date: 2020-09-25T17:01:06Z New Revision: 76eb163259c46171559a49111a394a3e48d1e523 URL: https://github.com/llvm/llvm-project/commit/76eb163259c46171559a49111a394a3e48d1e523 DIFF: https://github.com/llvm/llvm-project/commit/76eb163259c46171559a49111a394a3e48d1e523.diff

[PATCH] D88263: Sema: remove unnecessary parameter for SwiftName handling (NFCI)

2020-09-25 Thread Saleem Abdulrasool via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG76eb163259c4: Sema: remove unnecessary parameter for SwiftName handling (NFCI) (authored by compnerd). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D88263/ne

[PATCH] D54222: [clang-tidy] Add a check to detect returning static locals in public headers

2020-09-25 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added a comment. In D54222#2294123 , @jranieri-grammatech wrote: > In D54222#1290789 , @JonasToth wrote: > >> I agree with @Eugene.Zelenko that this check should rather live in >> `bugprone-` as the issu

[PATCH] D88275: [ASTMatchers] Add matcher `hasParentIgnoringImplicit`.

2020-09-25 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. This seems to be strongly related to the `TK_IgnoreUnlessSpelledInSource` traversal behavior; is there a reason you can't use that traversal mode with `hasParent()` (does it behave differently)? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION h

[PATCH] D88275: [ASTMatchers] Add matcher `hasParentIgnoringImplicit`.

2020-09-25 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel added a comment. In D88275#2295379 , @aaron.ballman wrote: > This seems to be strongly related to the `TK_IgnoreUnlessSpelledInSource` > traversal behavior; is there a reason you can't use that traversal mode with > `hasParent()` (does it behave

[PATCH] D88275: [ASTMatchers] Add matcher `hasParentIgnoringImplicit`.

2020-09-25 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 294363. ymandel added a comment. restored changes to unrelated parts of html docs. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D88275/new/ https://reviews.llvm.org/D88275 Files: clang/docs/LibASTMatchersRef

[PATCH] D78075: [Clang][OpenMP] Added support for nowait target in CodeGen

2020-09-25 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert accepted this revision. jdoerfert added a comment. This revision is now accepted and ready to land. LGTM. Nice to get async through "regular" tasks :) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D78075/new/ https://reviews.llvm.org/D7807

[PATCH] D87956: [WIP][IR] add fn attr for no_stack_protector; prevent inlining ssp into no-ssp

2020-09-25 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added inline comments. Comment at: clang/test/CodeGen/stack-protector.c:39 // SAFESTACK-NOSSP: attributes #[[A]] = {{.*}} safestack -// SAFESTACK-NOSSP-NOT: ssp +// SAFESTACK-NOSSP-NOT: attribute #[[A]] = {{.*}} ssp should be `attributes` plura

[PATCH] D88329: [objc] Consolidate ObjC name mangle code to AST

2020-09-25 Thread Ellis Hoag via Phabricator via cfe-commits
ellis created this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. ellis requested review of this revision. This reduces code duplication between CGObjCMac.cpp and Mangle.cpp for generating the mangled name of an Objective-C method. This has no intended functiona

[PATCH] D88329: [objc] Consolidate ObjC name mangle code to AST

2020-09-25 Thread Ellis Hoag via Phabricator via cfe-commits
ellis updated this revision to Diff 294395. ellis added a comment. Fix variable name Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D88329/new/ https://reviews.llvm.org/D88329 Files: clang/include/clang/AST/Mangle.h clang/lib/AST/Mangle.cpp cl

[PATCH] D88333: Correctly parse attributes on the declaration of an anonymous bit-field

2020-09-25 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman created this revision. aaron.ballman added reviewers: hubert.reinterpretcast, rsmith. aaron.ballman requested review of this revision. The C++ grammar allows you to specify an attribute list on an anonymous bit-field, but we were not properly parsing that case. This would lead to a

  1   2   >