[PATCH] D58609: [clang-tidy] bugprone-string-integer-assignment: Reduce false positives.

2019-02-25 Thread Clement Courbet via Phabricator via cfe-commits
courbet updated this revision to Diff 188316. courbet added a comment. - more tests Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58609/new/ https://reviews.llvm.org/D58609 Files: clang-tidy/bugprone/StringIntegerAssignmentCheck.cpp test/clang-

[PATCH] D58569: [libclang] Avoid crashing when getting layout info of an undeduced type.

2019-02-25 Thread Emilio Cobos Álvarez via Phabricator via cfe-commits
emilio marked 2 inline comments as done. emilio added a comment. Huh, somehow forgot to press "Submit" this morning :) Comment at: clang/tools/c-index-test/c-index-test.c:1695 +CXType RT = clang_getResultType(T); +if (RT.kind != CXType_Invalid) + PrintSingleTypeSiz

[PATCH] D58321: [WIP] Support for relative vtables

2019-02-25 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: clang/include/clang/Driver/Options.td:1250 + Group, Flags<[CC1Option]>, + HelpText<"Use the unstable C++ class ABI for classes with hidden LTO visibility">; def flto_jobs_EQ : Joined<["-"], "flto-jobs=">, Please mak

[PATCH] D56411: [CUDA][HIP][Sema] Fix template kernel with function as template parameter

2019-02-25 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. In D56411#1406212 , @yaxunl wrote: > I would like to fix the validation issue only and leave the overload > resolution issue for future. As I understand it, the "validation issue" is just that you'd like a diagnostic to be emi

[PATCH] D58634: [PR40778] Generate address space conversion when binding reference to a temporary value in different address space

2019-02-25 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: lib/CodeGen/CGCall.cpp:4067 + IRFuncTy->getParamType(FirstIRArg)->isPointerTy()) +V = Builder.CreatePointerBitCastOrAddrSpaceCast( +V, IRFuncTy->getParamType(FirstIRArg)); Anasta

[PATCH] D58663: [ASTImporter] Add support for importing ChooseExpr AST nodes.

2019-02-25 Thread Tom Roeder via Phabricator via cfe-commits
tmroeder updated this revision to Diff 188307. tmroeder added a comment. Dropped the C++ part of the ImportChooseExpr test entirely. This is the part that was breaking the tests on Windows, and after further experimentation, it turns out that clang on Windows never expands the template under th

[PATCH] D58514: Avoid needlessly copying blocks that initialize or are assigned to local auto variables to the heap

2019-02-25 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. Okay, one last minor request, then LGTM. Comment at: lib/CodeGen/CGObjC.cpp:2953 + return asImpl().visitExpr(e); +} + Oh, I'd forgotten this wasn't a normal expression visitor. Well, okay, this isn't too bad. Comm

[PATCH] D58663: [ASTImporter] Add support for importing ChooseExpr AST nodes.

2019-02-25 Thread Tom Roeder via Phabricator via cfe-commits
tmroeder created this revision. tmroeder added reviewers: shafik, a_sidorin, martong, aaron.ballman, rnk. tmroeder added a project: clang. Herald added a reviewer: a.sidorin. This allows ASTs to be merged when they contain ChooseExpr (the GNU __builtin_choose_expr construction). This is needed, fo

[PATCH] D52956: Support `-fno-visibility-inlines-hidden`

2019-02-25 Thread Shoaib Meenai via Phabricator via cfe-commits
smeenai added a comment. I tried committing this for you, but it doesn't apply to master. Could you rebase? Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D52956/new/ https://reviews.llvm.org/D52956 ___ cfe-commits ma

r354832 - [ASTImporter] Add support for importing ChooseExpr AST nodes.

2019-02-25 Thread Tom Roeder via cfe-commits
Author: tmroeder Date: Mon Feb 25 15:24:58 2019 New Revision: 354832 URL: http://llvm.org/viewvc/llvm-project?rev=354832&view=rev Log: [ASTImporter] Add support for importing ChooseExpr AST nodes. Summary: This allows ASTs to be merged when they contain ChooseExpr (the GNU __builtin_choose_expr c

r354843 - [CGDebugInfo] Set NonTrivial DIFlag to a c++ record if it's not trivial

2019-02-25 Thread Aaron Smith via cfe-commits
Author: asmith Date: Mon Feb 25 19:49:05 2019 New Revision: 354843 URL: http://llvm.org/viewvc/llvm-project?rev=354843&view=rev Log: [CGDebugInfo] Set NonTrivial DIFlag to a c++ record if it's not trivial This goes with https://reviews.llvm.org/D44406 Modified: cfe/trunk/lib/CodeGen/CGDebug

[PATCH] D37994: Implement LWG2946: More ambiguity in `string` vs. `string_view`

2019-02-25 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists abandoned this revision. mclow.lists added a comment. Herald added a subscriber: jdoerfert. This appears to have been applied in a slightly different form. Certainly the functionality is there. Closing. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D37994/new/ https://review

[PATCH] D58530: Add PragmaHandler for MSVC pragma execution_character_set

2019-02-25 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added a comment. Looks good and thorough, but it needs tests. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58530/new/ https://reviews.llvm.org/D58530 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https

[PATCH] D41950: Fix for Bug 8446. Template instantiation without a 'typename' keyword.

2019-02-25 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added a comment. In D41950#1409332 , @zahiraam wrote: > I don't think I have commit right can you please commit it. Thanks. Sure, done! Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D41950/new/ https://reviews.llvm.o

[PATCH] D41950: Fix for Bug 8446. Template instantiation without a 'typename' keyword.

2019-02-25 Thread Reid Kleckner via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC354838: [MS] Fix for Bug 8446, template instantiation without a 'typename' keyword (authored by rnk, committed by ). Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rC

[PATCH] D58292: Add support for importing ChooseExpr AST nodes.

2019-02-25 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added a comment. I had to revert this in rL354839 because one of the tests didn't pass on Windows: http://lab.llvm.org:8011/builders/clang-x64-windows-msvc/builds/4641 Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58292/new/

r354839 - Revert r354832 "[ASTImporter] Add support for importing ChooseExpr AST nodes."

2019-02-25 Thread Reid Kleckner via cfe-commits
Author: rnk Date: Mon Feb 25 18:22:22 2019 New Revision: 354839 URL: http://llvm.org/viewvc/llvm-project?rev=354839&view=rev Log: Revert r354832 "[ASTImporter] Add support for importing ChooseExpr AST nodes." Test does not pass on Windows Removed: cfe/trunk/test/ASTMerge/ Modified: cfe/t

r354838 - [MS] Fix for Bug 8446, template instantiation without a 'typename' keyword

2019-02-25 Thread Reid Kleckner via cfe-commits
Author: rnk Date: Mon Feb 25 18:22:17 2019 New Revision: 354838 URL: http://llvm.org/viewvc/llvm-project?rev=354838&view=rev Log: [MS] Fix for Bug 8446, template instantiation without a 'typename' keyword Patch by Zahira Ammarguellat! Differential Revision: https://reviews.llvm.org/D41950 Added

[PATCH] D58137: [clang-tidy] Add the abseil-time-subtraction check

2019-02-25 Thread Hyrum Wright via Phabricator via cfe-commits
hwright added inline comments. Comment at: clang-tidy/abseil/TimeSubtractionCheck.cpp:97 +void TimeSubtractionCheck::check(const MatchFinder::MatchResult &Result) { + const auto *BinOp = Result.Nodes.getNodeAs("binop"); + std::string inverse_name = JonasToth wr

[PATCH] D58137: [clang-tidy] Add the abseil-time-subtraction check

2019-02-25 Thread Hyrum Wright via Phabricator via cfe-commits
hwright updated this revision to Diff 188289. hwright marked 5 inline comments as done. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58137/new/ https://reviews.llvm.org/D58137 Files: clang-tidy/abseil/AbseilTidyModule.cpp clang-tidy/abseil/CMakeLists.txt clang-tidy/abseil/Duration

[PATCH] D58659: [Sema] Fix assertion when `auto` parameter in lambda has an attribute.

2019-02-25 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai added a comment. Have doubts that checking only the outermost type for being `AttributedType` after `Sema::ReplaceAutoType` is sufficient but haven't found a counterexample yet. Decided to post the proposed fix to see if others have any ideas. CHANGES SINCE LAST ACTION https://review

[PATCH] D58659: [Sema] Fix assertion when `auto` parameter in lambda has an attribute.

2019-02-25 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai created this revision. vsapsai added reviewers: rsmith, arphaman. Herald added subscribers: jdoerfert, dexonsmith, jkorous. Fixes the assertion > no Attr* for AttributedType* > UNREACHABLE executed at llvm-project/clang/lib/Sema/SemaType.cpp:298! In `TypeProcessingState::getAttributedTy

[PATCH] D58658: [OpenCL] Fix assertion due to blocks

2019-02-25 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl created this revision. yaxunl added a reviewer: Anastasia. Herald added subscribers: kristof.beyls, javed.absar. A recent change caused assertion in CodeGenFunction::EmitBlockCallExpr when a block is called. There is code if (!isa(E->getCalleeDecl())) Func = CGM.getOpenCLRuntime().

[PATCH] D58292: Add support for importing ChooseExpr AST nodes.

2019-02-25 Thread Tom Roeder via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL354832: [ASTImporter] Add support for importing ChooseExpr AST nodes. (authored by tmroeder, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit:

[PATCH] D58649: Fix inline assembler constraint validation

2019-02-25 Thread Joerg Sonnenberger via Phabricator via cfe-commits
joerg created this revision. joerg added a reviewer: compnerd. Herald added a subscriber: eraman. The current constraint logic is both too lax and too strict. It fails for input outside the [INT_MIN..INT_MAX] range, but it also implicitly accepts 0 as value when it should not. Adjust logic to ha

[PATCH] D58292: Add support for importing ChooseExpr AST nodes.

2019-02-25 Thread Tom Roeder via Phabricator via cfe-commits
tmroeder updated this revision to Diff 188262. tmroeder added a comment. Updating after switching to the git monorepo model. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58292/new/ https://reviews.llvm.org/D58292 Files: clang/docs/LibASTMatcher

r354831 - [NFC] Reorder some mis-ordered tests

2019-02-25 Thread JF Bastien via cfe-commits
Author: jfb Date: Mon Feb 25 15:09:34 2019 New Revision: 354831 URL: http://llvm.org/viewvc/llvm-project?rev=354831&view=rev Log: [NFC] Reorder some mis-ordered tests I somehow had misaligned some of the tests when I originally wrote this. Re-order them properly. Modified: cfe/trunk/test/Co

[PATCH] D57898: CodeGen: Fix PR40605: split constant structures generated by -ftrivial-auto-var-init when emitting initializators

2019-02-25 Thread JF Bastien via Phabricator via cfe-commits
jfb added a comment. I think (with test updates) this will be good to go once D58188 lands. Comment at: tools/clang/lib/CodeGen/CGDecl.cpp:1158 + llvm::StructType *STy = dyn_cast(Ty); + if (STy && (STy == Loc.getElementType()) && + shou

Re: r354795 - Make static counters in ASTContext non-static.

2019-02-25 Thread Alexander Kornienko via cfe-commits
Done. r354827 should be better. On Mon, Feb 25, 2019 at 11:18 PM Alexander Kornienko wrote: > Thank you for taking care of this! That's a bug indeed. Will recommit with > a fix. > > On Mon, Feb 25, 2019 at 9:25 PM Vlad Tsyrklevich > wrote: > >> I've reverted this commit in r354812, it was causi

r354827 - Reapply "Make static counters in ASTContext non-static." with fixes.

2019-02-25 Thread Alexander Kornienko via cfe-commits
Author: alexfh Date: Mon Feb 25 14:22:09 2019 New Revision: 354827 URL: http://llvm.org/viewvc/llvm-project?rev=354827&view=rev Log: Reapply "Make static counters in ASTContext non-static." with fixes. This reverts commit e50038e4dc53caee1acc811362ac0b15e00ef5eb. Modified: cfe/trunk/include/

Re: r354795 - Make static counters in ASTContext non-static.

2019-02-25 Thread Alexander Kornienko via cfe-commits
Thank you for taking care of this! That's a bug indeed. Will recommit with a fix. On Mon, Feb 25, 2019 at 9:25 PM Vlad Tsyrklevich wrote: > I've reverted this commit in r354812, it was causing MSan failures like > http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-fast/builds/29886/steps/c

r354826 - [CodeGenObjC] Fix a nullptr dyn_cast

2019-02-25 Thread Erik Pilkington via cfe-commits
Author: epilk Date: Mon Feb 25 13:35:14 2019 New Revision: 354826 URL: http://llvm.org/viewvc/llvm-project?rev=354826&view=rev Log: [CodeGenObjC] Fix a nullptr dyn_cast ObjCMessageExpr::getInstanceReceiver returns nullptr if the receiver is 'super'. Make this check more strict, since we don't car

[PATCH] D58541: [CodeComplete] Propagate preferred type for function arguments in more cases

2019-02-25 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet accepted this revision. kadircet added a comment. This revision is now accepted and ready to land. Thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58541/new/ https://reviews.llvm.org/D58541

[PATCH] D58089: Add missing library dependencies in CMakeLists.txt

2019-02-25 Thread Nicholas Allegra via Phabricator via cfe-commits
comex added a comment. Ping. Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58089/new/ https://reviews.llvm.org/D58089 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-b

[PATCH] D58321: [WIP] Support for relative vtables

2019-02-25 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added a comment. In D58321#1407362 , @pcc wrote: > Can we start with a patch that just exposes a flag that enables the relative > ABI unconditionally, and remove all the platform ABI compatibility stuff? Done. Removed the checks requiring LT

[PATCH] D58321: [WIP] Support for relative vtables

2019-02-25 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 188256. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58321/new/ https://reviews.llvm.org/D58321 Files: clang/include/clang/AST/DeclCXX.h clang/include/clang/AST/VTableBuilder.h clang/include/clang/Bas

[PATCH] D58569: [libclang] Avoid crashing when getting layout info of an undeduced type.

2019-02-25 Thread Emilio Cobos Álvarez via Phabricator via cfe-commits
emilio updated this revision to Diff 188254. emilio marked an inline comment as done. emilio added a comment. Add CHECK tests. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58569/new/ https://reviews.llvm.org/D58569 Files: clang/include/clang-c/

[PATCH] D58570: [libclang] Expose warn_unused and warn_unused_result attributes.

2019-02-25 Thread Emilio Cobos Álvarez via Phabricator via cfe-commits
emilio added a comment. Landed with that change, thanks for the review @anastasia! Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58570/new/ https://reviews.llvm.org/D58570 ___ cfe-commits mailing list cfe-commits@lis

[PATCH] D58570: [libclang] Expose warn_unused and warn_unused_result attributes.

2019-02-25 Thread Emilio Cobos Álvarez via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC354824: [libclang] Expose warn_unused and warn_unused_result attributes. (authored by emilio, committed by ). Herald added a reviewer: serge-sans-paille. Changed prior to commit: https://reviews.llvm.or

r354824 - [libclang] Expose warn_unused and warn_unused_result attributes.

2019-02-25 Thread Emilio Cobos Alvarez via cfe-commits
Author: emilio Date: Mon Feb 25 13:24:52 2019 New Revision: 354824 URL: http://llvm.org/viewvc/llvm-project?rev=354824&view=rev Log: [libclang] Expose warn_unused and warn_unused_result attributes. This is helpful to properly detect them, and fixing issues like https://github.com/rust-lang/rust-b

[PATCH] D58571: [libclang] Fix a trivial error introduced in D57946.

2019-02-25 Thread Emilio Cobos Álvarez via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL354823: [libclang] Fix a trivial error introduced in D57946. (authored by emilio, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit: https://

r354823 - [libclang] Fix a trivial error introduced in D57946.

2019-02-25 Thread Emilio Cobos Alvarez via cfe-commits
Author: emilio Date: Mon Feb 25 13:15:34 2019 New Revision: 354823 URL: http://llvm.org/viewvc/llvm-project?rev=354823&view=rev Log: [libclang] Fix a trivial error introduced in D57946. The value for CXCursor_ConvergentAttr is not 420. I'm not really sure how easy it is to test this, and I'm not

[PATCH] D58091: Customize warnings for missing built-in type

2019-02-25 Thread Brian Cain via Phabricator via cfe-commits
bcain added inline comments. Comment at: clang/include/clang/Basic/DiagnosticSemaKinds.td:592 +: Warning<"declaration of built-in function '%0' requires the declaration" +" of the 'jmp_buf' type, commonly proived in the header .">, + InGroup>; "proiv

[PATCH] D58638: [OpenMP 5.0] Parsing/sema support for from clause with mapper modifier

2019-02-25 Thread Michael Kruse via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL354817: [OpenMP 5.0] Parsing/sema support for from clause with mapper modifier. (authored by Meinersbur, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prio

r354817 - [OpenMP 5.0] Parsing/sema support for from clause with mapper modifier.

2019-02-25 Thread Michael Kruse via cfe-commits
Author: meinersbur Date: Mon Feb 25 12:34:15 2019 New Revision: 354817 URL: http://llvm.org/viewvc/llvm-project?rev=354817&view=rev Log: [OpenMP 5.0] Parsing/sema support for from clause with mapper modifier. This patch implements the parsing and sema support for the OpenMP 'from'-clause with pot

[PATCH] D58404: [clang-format] Add basic support for formatting C# files

2019-02-25 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay updated this revision to Diff 188239. MyDeveloperDay added a subscriber: llvm-commits. MyDeveloperDay added a comment. Fix a crash running clang-format over large C# code base Add support for C# Null Coalescing CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58404/new/ http

Re: r354795 - Make static counters in ASTContext non-static.

2019-02-25 Thread Vlad Tsyrklevich via cfe-commits
I've reverted this commit in r354812, it was causing MSan failures like http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-fast/builds/29886/steps/check-clang%20msan/logs/stdio Though these error reports don't clearly implicate this change, from your change it seems like the failure is occurr

[PATCH] D57335: [IR] Don't assume all functions are 4 byte aligned

2019-02-25 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added a subscriber: hfinkel. efriedma added a comment. Chandler, when you have a chance, can you look at the LangRef changes, since you put some thought into the design? I think the DataLayout/LangRef changes look correct. I agree it isn't necessary to fix every target in the initial p

[PATCH] D58091: Customize warnings for missing built-in type

2019-02-25 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added a comment. I did address the comments but I will wait until I hear back on the "warning vs warning + note question". In D58091#1397586 , @jyknight wrote: > I think this warning (-Wbuiltin-requires-header) doesn't really make sense as > i

[PATCH] D58091: Customize warnings for missing built-in type

2019-02-25 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert updated this revision to Diff 188238. jdoerfert marked 3 inline comments as done. jdoerfert added a comment. Address comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58091/new/ https://reviews.llvm.org/D58091 Files: clang/include

Re: [PATCH] D56933: [Tooling][RFC] Introduce Stencil library to simplify source code generation in refactorings.

2019-02-25 Thread Yitzhak Mandelbaum via cfe-commits
We're working out the details, but the intent is that the Tree-transformation library would support the implementation of Transformer. That is, this library is targeted at a lower-level/more advanced user than Transformer. Currently, Transformer is implemented directly on the clang AST API, but we

[PATCH] D50488: [Analyzer] Checker for non-determinism caused by sorting of pointer-like elements

2019-02-25 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang added a comment. In D50488#1407975 , @Szelethus wrote: > But, as a work-in-progress alpha checker, the direction is set and looks > great. Please let @NoQ have the final say. Thanks a lot @Szelethus! I will wait for @NoQ 's comments. Repository

[PATCH] D50488: [Analyzer] Checker for non-determinism caused by sorting of pointer-like elements

2019-02-25 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang added a comment. In D50488#1407884 , @Szelethus wrote: > In D50488#1405094 , @mgrang wrote: > > > So I was able compile a couple of C++ code bases through csa-testbench. I > > built cppcheck and tinyxml2 wit

[PATCH] D50488: [Analyzer] Checker for non-determinism caused by sorting of pointer-like elements

2019-02-25 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang marked an inline comment as done. mgrang added inline comments. Comment at: include/clang/StaticAnalyzer/Checkers/Checkers.td:97 +def NonDeterminismAlpha : Package<"nondeterminism">, ParentPackage; + Szelethus wrote: > Hmmm, okay, so your checker ks C++

[PATCH] D56933: [Tooling][RFC] Introduce Stencil library to simplify source code generation in refactorings.

2019-02-25 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added subscribers: ilya-biryukov, gribozavr, lebedev.ri. lebedev.ri added a comment. See also: https://lists.llvm.org/pipermail/cfe-dev/2019-February/061414.html How are these two RFC's/API's supposed to interact/coexist/etc? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST A

[PATCH] D50488: [Analyzer] Checker for non-determinism caused by sorting of pointer-like elements

2019-02-25 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang updated this revision to Diff 188232. mgrang set the repository for this revision to rC Clang. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D50488/new/ https://reviews.llvm.org/D50488 Files: docs/analyzer/checkers.rst include/clang/StaticAnalyzer/Checke

r354812 - Revert "Make static counters in ASTContext non-static."

2019-02-25 Thread Vlad Tsyrklevich via cfe-commits
Author: vlad.tsyrklevich Date: Mon Feb 25 11:53:13 2019 New Revision: 354812 URL: http://llvm.org/viewvc/llvm-project?rev=354812&view=rev Log: Revert "Make static counters in ASTContext non-static." This reverts commit r354795, I suspect it is causing test failures on MSan sanitizer bots. Modifi

[PATCH] D58556: [LibTooling] Add "smart" retrieval of AST-node source to FixIt library

2019-02-25 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. Thanks, the APIs totally make sense. And seem to fit into the other functions we have in `FixIt.h`, although the name of the file is somewhat misleading. Mostly comments about naming and one comment about the necessity of using matchers from my side. ===

[PATCH] D58541: [CodeComplete] Propagate preferred type for function arguments in more cases

2019-02-25 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Comment at: clang/lib/Sema/SemaCodeComplete.cpp:494 default: assert(false && "unhnalded unary op"); return QualType(); xbolva00 wrote: > Typo? Fixed it. Thanks. Repository: rG LLVM Github Monorepo CHANGES SIN

[PATCH] D58541: [CodeComplete] Propagate preferred type for function arguments in more cases

2019-02-25 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov updated this revision to Diff 188226. ilya-biryukov marked 2 inline comments as done. ilya-biryukov added a comment. - Fix a typo Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58541/new/ https://reviews.llvm.org/D58541 Files: clang

[PATCH] D58541: [CodeComplete] Propagate preferred type for function arguments in more cases

2019-02-25 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Comment at: clang/include/clang/Sema/Sema.h:294 + /// function_ref, clients should make sure all calls to get() with the same + /// location happen while function_ref is alive. + void enterFunctionArgument(SourceLocation Tok, --

[PATCH] D58541: [CodeComplete] Propagate preferred type for function arguments in more cases

2019-02-25 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov updated this revision to Diff 188225. ilya-biryukov marked 3 inline comments as done. ilya-biryukov added a comment. - Check in the middle and at the end of identifiers. - Add a test for the second parameter and a class member function Repository: rG LLVM Github Monorepo CHANGES

[PATCH] D58292: Add support for importing ChooseExpr AST nodes.

2019-02-25 Thread Tom Roeder via Phabricator via cfe-commits
tmroeder updated this revision to Diff 188224. tmroeder added a comment. Changed to use llvm::find. Given the disagreement about the destructuring assignment, I didn't make that change. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58292/new/ https://reviews.ll

[PATCH] D57892: [analyzer] Fix macro printer crash when macro comes from another translation unit

2019-02-25 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. Whoops, incorrect commit title and description. Anyways, the committed code and the revision number is OK... Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57892/new/ https://reviews.llvm.org/D57892 ___

[PATCH] D57892: [analyzer] Fix macro printer crash when macro comes from another translation unit

2019-02-25 Thread Kristóf Umann via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL354806: [analyzer] Fix infinite recursion in printing macros (authored by Szelethus, committed by ). Herald added subscribers: llvm-commits, Charusso. Herald added a project: LLVM. Changed prior to commit

r354806 - [analyzer] Fix infinite recursion in printing macros

2019-02-25 Thread Kristof Umann via cfe-commits
Author: szelethus Date: Mon Feb 25 10:49:42 2019 New Revision: 354806 URL: http://llvm.org/viewvc/llvm-project?rev=354806&view=rev Log: [analyzer] Fix infinite recursion in printing macros #define f(y) x #define x f(x) int main() { x; } This example results a compilation error since "x" in the f

[PATCH] D58638: [OpenMP 5.0] Parsing/sema support for from clause with mapper modifier

2019-02-25 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 CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58638/new/ https://reviews.llvm.org/D58638 ___ cfe-commits ma

[PATCH] D58638: [OpenMP 5.0] Parsing/sema support for from clause with mapper modifier

2019-02-25 Thread Lingda Li via Phabricator via cfe-commits
lildmh created this revision. lildmh added reviewers: ABataev, hfinkel, Meinersbur, kkwli0. lildmh added a project: OpenMP. Herald added subscribers: cfe-commits, jdoerfert, guansong. Herald added a project: clang. This patch implements the parsing and sema support for OpenMP from clause with pot

[PATCH] D56924: Special case ObjCPropertyDecl for printing

2019-02-25 Thread David Goldman via Phabricator via cfe-commits
dgoldman added a comment. In D56924#1407836 , @arphaman wrote: > Please add a test that covers the '(class extension)' output as well. Removed the `(class extension)` output as the property getter if statement should now handle this. Repository: rC

[PATCH] D56924: Handle ObjCCategoryDecl class extensions for print

2019-02-25 Thread David Goldman via Phabricator via cfe-commits
dgoldman updated this revision to Diff 188213. dgoldman added a comment. - Remove (class extension) as it's no longer needed Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56924/new/ https://reviews.llvm.org/D56924 Files: lib/AST/Decl.cpp unittests/AST/NamedD

[PATCH] D58612: Make the static counters in ASTContext non-static

2019-02-25 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added a comment. In D58612#1409216 , @riccibruno wrote: > In D58612#1409215 , @alexfh wrote: > > > > In D58612#1409024 , @riccibruno > > > wrote: > > > > > >> ... >

[PATCH] D58569: [libclang] Avoid crashing when getting layout info of an undeduced type.

2019-02-25 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: clang/tools/c-index-test/c-index-test.c:1695 +CXType RT = clang_getResultType(T); +if (RT.kind != CXType_Invalid) + PrintSingleTypeSize(RT, " [resulttype=%s] [resulttypekind=%s]", emilio wrote: > Anastasia

[PATCH] D58634: [PR40778] Generate address space conversion when binding reference to a temporary value in different address space

2019-02-25 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia marked an inline comment as done. Anastasia added inline comments. Comment at: lib/CodeGen/CGCall.cpp:4067 + IRFuncTy->getParamType(FirstIRArg)->isPointerTy()) +V = Builder.CreatePointerBitCastOrAddrSpaceCast( +V, IRFuncTy->getPa

[PATCH] D58634: [PR40778] Generate address space conversion when binding reference to a temporary value in different address space

2019-02-25 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia created this revision. Anastasia added reviewers: rjmccall, ebevhan. This is fixing one of the issues reported in the bug: https://bugs.llvm.org/show_bug.cgi?id=40778 https://reviews.llvm.org/D58634 Files: lib/CodeGen/CGCall.cpp test/CodeGenOpenCLCXX/addrspace-references.cl Inde

[PATCH] D57335: [IR] Don't assume all functions are 4 byte aligned

2019-02-25 Thread Michael Platings via Phabricator via cfe-commits
michaelplatings marked 4 inline comments as done. michaelplatings added inline comments. Comment at: llvm/lib/IR/ConstantFold.cpp:1087 + if (GVAlign == 0U && isa(GV)) +GVAlign = 4U; efriedma wrote: > Using "4" as a default is dangerous; on

[PATCH] D58504: [OpenCL][8.0.0 Release] Notes for OpenCL

2019-02-25 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. Committed to the release branch r354799. FYI, I did a couple of formatting changes and typo fixes. Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58504/new/ https://reviews.llvm.org/D58504 _

[PATCH] D58504: [OpenCL][8.0.0 Release] Notes for OpenCL

2019-02-25 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL354799: Release notes for OpenCL (authored by stulova, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.llvm.org/D58504?vs=

[PATCH] D58612: Use std::atomic<> for static counters.

2019-02-25 Thread Bruno Ricci via Phabricator via cfe-commits
riccibruno added a comment. In D58612#1409215 , @alexfh wrote: > > In D58612#1409024 , @riccibruno > > wrote: > > > >> ... > >> For example in `DeclBase.cpp` > >> > >> #define DECL(DERIVED, BASE) static int n##

[PATCH] D58612: Use std::atomic<> for static counters.

2019-02-25 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added a comment. > In D58612#1409024 , @riccibruno > wrote: > >> ... >> For example in `DeclBase.cpp` >> >> #define DECL(DERIVED, BASE) static int n##DERIVED##s = 0; >> #define ABSTRACT_DECL(DECL) >> #include "clang/AST/DeclNodes.inc" >> >>

[PATCH] D57590: [ASTImporter] Improve import of FileID.

2019-02-25 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. Herald added a reviewer: martong. Ping. Please raise your objections if you have any until the 4th of March (that date we are going to commit if there are no objections). Also, please let us know if you find this deadline too strict. Repository: rC Clang CHANGES SI

[PATCH] D57335: [IR] Don't assume all functions are 4 byte aligned

2019-02-25 Thread Michael Platings via Phabricator via cfe-commits
michaelplatings updated this revision to Diff 188184. michaelplatings added a comment. Herald added subscribers: cfe-commits, jdoerfert, mgorny, dschuff. Herald added projects: clang, LLVM. Hi @efriedma, sorry for the delayed response. I've added the features you asked for to DataLayout. It is int

[PATCH] D58612: Use std::atomic<> for static counters.

2019-02-25 Thread Alexander Kornienko via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL354795: Make static counters in ASTContext non-static. (authored by alexfh, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit: https://review

[PATCH] D58612: Use std::atomic<> for static counters.

2019-02-25 Thread Bruno Ricci via Phabricator via cfe-commits
riccibruno added a comment. (With a commit message which actually reflect the change of course) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58612/new/ https://reviews.llvm.org/D58612 ___ cfe-commits

r354795 - Make static counters in ASTContext non-static.

2019-02-25 Thread Alexander Kornienko via cfe-commits
Author: alexfh Date: Mon Feb 25 08:08:46 2019 New Revision: 354795 URL: http://llvm.org/viewvc/llvm-project?rev=354795&view=rev Log: Make static counters in ASTContext non-static. Summary: Fixes a data race and makes it possible to run clang-based tools in multithreaded environment with TSan. Re

[PATCH] D58612: Use std::atomic<> for static counters.

2019-02-25 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov accepted this revision. ilya-biryukov added a comment. LGTM! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58612/new/ https://reviews.llvm.org/D58612 ___ cfe-commits mailing list cfe-comm

[PATCH] D58627: [git] Add top-level .gitignore

2019-02-25 Thread Michael Liao via Phabricator via cfe-commits
hliao abandoned this revision. hliao added a comment. by mistake, Ctrl-C is not fast enough to stop it. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58627/new/ https://reviews.llvm.org/D58627 ___ cfe-

[PATCH] D58627: [git] Add top-level .gitignore

2019-02-25 Thread Michael Liao via Phabricator via cfe-commits
hliao created this revision. hliao added reviewers: kzhuravl, yaxunl. hliao added a project: clang. Herald added subscribers: llvm-commits, hiraditya. Herald added a project: LLVM. [D56411 ] Temp solution fixing CUDA template issue - template with overloadable ke

[PATCH] D56539: [clangd] Drop documentation in static index if symbols are not indexed for completion.

2019-02-25 Thread Haojian Wu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rCTE354792: [clangd] Drop documentation in static index if symbols are not indexed for… (authored by hokein, committed by ). Changed prior to commit: https://reviews.llvm.org/D56539?vs=188176&id=188180#to

[PATCH] D58612: Use std::atomic<> for static counters.

2019-02-25 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. Awesome, I was also surprised it's so easy to convert them. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58612/new/ https://reviews.llvm.org/D58612 ___ cfe-commits maili

[PATCH] D42645: New simple Checker for mmap calls

2019-02-25 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added inline comments. Herald added a subscriber: jdoerfert. Herald added a project: LLVM. Comment at: cfe/trunk/lib/StaticAnalyzer/Checkers/MmapWriteExecChecker.cpp:31-33 + static int ProtWrite; + static int ProtExec; + static int ProtRead; Can these b

[clang-tools-extra] r354792 - [clangd] Drop documentation in static index if symbols are not indexed for completion.

2019-02-25 Thread Haojian Wu via cfe-commits
Author: hokein Date: Mon Feb 25 08:00:00 2019 New Revision: 354792 URL: http://llvm.org/viewvc/llvm-project?rev=354792&view=rev Log: [clangd] Drop documentation in static index if symbols are not indexed for completion. Summary: This is a further optimization of r350803, we drop docs in static i

[PATCH] D58612: Use std::atomic<> for static counters.

2019-02-25 Thread Bruno Ricci via Phabricator via cfe-commits
riccibruno accepted this revision. riccibruno added a comment. This revision is now accepted and ready to land. Sounds good. LGTM. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58612/new/ https://reviews.llvm.org/D58612 _

[PATCH] D58569: [libclang] Avoid crashing when getting layout info of an undeduced type.

2019-02-25 Thread Emilio Cobos Álvarez via Phabricator via cfe-commits
emilio marked 2 inline comments as done. emilio added inline comments. Comment at: clang/tools/c-index-test/c-index-test.c:1695 +CXType RT = clang_getResultType(T); +if (RT.kind != CXType_Invalid) + PrintSingleTypeSize(RT, " [resulttype=%s] [resulttypekind=%s]",

[PATCH] D58612: Use std::atomic<> for static counters.

2019-02-25 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added a comment. In D58612#1409024 , @riccibruno wrote: > In D58612#1408991 , @alexfh wrote: > > > In D58612#1408942 , @riccibruno > > wrote: > > > > > Okay, but what

[PATCH] D58504: [OpenCL][8.0.0 Release] Notes for OpenCL

2019-02-25 Thread Hans Wennborg via Phabricator via cfe-commits
hans added inline comments. Comment at: docs/ReleaseNotes.rst:228 -OpenCL C Language Changes in Clang +OpenCL Language Changes in Clang -- Anastasia wrote: > Anastasia wrote: > > AlexeySotkin wrote: > > > AlexeySotkin wrote: > >

[PATCH] D56539: [clangd] Drop documentation in static index if symbols are not indexed for completion.

2019-02-25 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 188176. hokein marked an inline comment as done. hokein added a comment. Herald added a subscriber: jdoerfert. Herald added a project: clang. Rebase and address comment. Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.or

[PATCH] D57914: [Driver] Allow enum SanitizerOrdinal to represent more than 64 different sanitizer checks, NFC.

2019-02-25 Thread pierre gousseau via Phabricator via cfe-commits
pgousseau marked 2 inline comments as done. pgousseau added inline comments. Comment at: include/clang/Basic/Sanitizers.h:54 + static constexpr bool + checkBitPos(const SanitizerKind::SanitizerOrdinal &Pos) { +return Pos < kNumBits; riccibruno wrote: > `San

[PATCH] D57914: [Driver] Allow enum SanitizerOrdinal to represent more than 64 different sanitizer checks, NFC.

2019-02-25 Thread pierre gousseau via Phabricator via cfe-commits
pgousseau updated this revision to Diff 188175. pgousseau added a comment. Keep `enum SanitizerOrdinal` as it was inside `SanitizerKind` namespace, fix comment. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57914/new/ https://reviews.llvm.org/D57914 Files: include/clang/Basic/Attr.t

[PATCH] D58623: [AMDGPU] Allow using integral non-type template parameters

2019-02-25 Thread Michael Liao via Phabricator via cfe-commits
hliao added a comment. non-type template parameter is used in these attributes in one of major workload. In addition, it also revises the constexpr support by allowing lvalue. The diagnostic message is refined too by pointing out which parameter violates the requirement of constant integer. Pre

[PATCH] D58612: Use std::atomic<> for static counters.

2019-02-25 Thread Bruno Ricci via Phabricator via cfe-commits
riccibruno added a comment. In D58612#1408991 , @alexfh wrote: > In D58612#1408942 , @riccibruno > wrote: > > > Okay, but what about the other similar uses of static members which have > > the same problem ? > > >

  1   2   >