[PATCH] D60827: [rename] Deduplicate symbol occurrences

2019-05-09 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet requested changes to this revision. kadircet added a comment. This revision now requires changes to proceed. Note that the bug has been fixed with D61596 incidentally Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D60507: [clang-tidy] new check: bugprone-unhandled-self-assignment

2019-05-09 Thread Tamás Zolnai via Phabricator via cfe-commits
ztamas added a comment. > I definitely want to see the diagnostic text changed away from "might be" -- > that's too noncommittal for my tastes. I'd also like to see the additional > test case (I suspect it will just work out of the box, but if it doesn't, it > would be good to know about it).

[PATCH] D60456: [RISCV][WIP/RFC] Hard float ABI support

2019-05-09 Thread Alex Bradbury via Phabricator via cfe-commits
asb updated this revision to Diff 198797. asb marked 3 inline comments as done. asb added a comment. Update: - Expanded and improved tests - Set ABI defines - Remove errant TODO - Use alignTo Still to do: - Review and test bitfield handling (which is likely incomplete) CHANGES SINCE LAST

[PATCH] D53866: [Preamble] Stop circular inclusion of main file when building preamble

2019-05-09 Thread Nikolai Kosjar via Phabricator via cfe-commits
nik marked an inline comment as done. nik added inline comments. Comment at: lib/Basic/SourceManager.cpp:1594 SourceFileName = llvm::sys::path::filename(SourceFile->getName()); -if (*SourceFileName == llvm::sys::path::filename(MainFile->getName())) { +

[PATCH] D53866: [Preamble] Stop circular inclusion of main file when building preamble

2019-05-09 Thread Nikolai Kosjar via Phabricator via cfe-commits
nik updated this revision to Diff 198799. nik added a comment. Moved the MainFile / MainContentCache->OrigEntry check a bit further up, for consistency with the same test further down in SourceManager::translateFile(). Repository: rC Clang CHANGES SINCE LAST ACTION

[PATCH] D24892: [clang-tidy] Add option "LiteralInitializers" to cppcoreguidelines-pro-type-member-init

2019-05-09 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. LGTM Comment at: clang-tools-extra/clang-tidy/cppcoreguidelines/ProTypeMemberInitCheck.cpp:361 + case BuiltinType::Float: +return " = 0.0F"; + case BuiltinType::Double: We may not have

[PATCH] D61668: [ARM] Fix the extensions implied by a cpu name

2019-05-09 Thread Diogo N. Sampaio via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL360324: [ARM] Fix the extensions implied by a cpu name (authored by dnsampaio, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Repository: rL LLVM CHANGES SINCE

r360324 - [ARM] Fix the extensions implied by a cpu name

2019-05-09 Thread Diogo N. Sampaio via cfe-commits
Author: dnsampaio Date: Thu May 9 03:24:36 2019 New Revision: 360324 URL: http://llvm.org/viewvc/llvm-project?rev=360324=rev Log: [ARM] Fix the extensions implied by a cpu name Summary: When using `clang -mcpu=CPUNAME+FEATURELIST`, the implied features defined by CPUNAME are not obtained, as

[PATCH] D50993: [clangd] Increase stack size of the new threads on macOS

2019-05-09 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. We should definitely land this. @Dmitry.Kozhevnikov, you don't have commit access, right? Should we land these two revisions for you? Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D50993/new/

[PATCH] D41911: [clangd] Include scanner that finds compile commands for headers.

2019-05-09 Thread Sam McCall via Phabricator via cfe-commits
sammccall marked 2 inline comments as done. sammccall added a comment. Context here, this patch is over a year old and predates the work on heuristically picking a compile command from another file in the CDB. I don't think anyone has concrete plans to revive this, the heuristics work well

[PATCH] D60934: [clang] adding explicit(bool) from c++2a

2019-05-09 Thread Simon Pilgrim via Phabricator via cfe-commits
RKSimon added inline comments. Comment at: cfe/trunk/lib/Parse/ParseDecl.cpp:3939 + "both or neither of isAlreadyConsumed and " + "RangeEnd needs to be set"); +DS.SetRangeEnd(isAlreadyConsumed ?

[PATCH] D41005: Reuse preamble even if an unsaved file does not exist

2019-05-09 Thread Nikolai Kosjar via Phabricator via cfe-commits
nik updated this revision to Diff 198809. nik added a comment. Addressed inline comments. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D41005/new/ https://reviews.llvm.org/D41005 Files: include/clang/Frontend/ASTUnit.h lib/Frontend/ASTUnit.cpp

[PATCH] D61729: [docs] Fix example for Allman brace breaking style

2019-05-09 Thread Gerriet Backer via Phabricator via cfe-commits
gerriet created this revision. gerriet added reviewers: jkorous, llvm-commits. Herald added subscribers: cfe-commits, dexonsmith. Herald added a project: clang. Commit 3fd4a968ad80 by @jkorous was wrongfully rolled back.

[PATCH] D53866: [Preamble] Stop circular inclusion of main file when building preamble

2019-05-09 Thread Nikolai Kosjar via Phabricator via cfe-commits
nik marked an inline comment as done. nik added inline comments. Comment at: lib/Basic/SourceManager.cpp:1594 SourceFileName = llvm::sys::path::filename(SourceFile->getName()); -if (*SourceFileName == llvm::sys::path::filename(MainFile->getName())) { +

[PATCH] D59481: [clangd] Count number of references while merging RefSlabs inside FileIndex

2019-05-09 Thread Kadir Cetinkaya via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rCTE360344: [clangd] Count number of references while merging RefSlabs inside FileIndex (authored by kadircet, committed by ). Changed prior to commit:

[PATCH] D59481: [clangd] Count number of references while merging RefSlabs inside FileIndex

2019-05-09 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 198816. kadircet marked 2 inline comments as done. kadircet added a comment. - Address comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59481/new/ https://reviews.llvm.org/D59481 Files:

[PATCH] D61522: Added an assertion to constant evaluation enty points that prohibits dependent expressions

2019-05-09 Thread Dmitri Gribenko via Phabricator via cfe-commits
gribozavr marked an inline comment as done. gribozavr added inline comments. Comment at: clang/lib/Sema/SemaOverload.cpp:6369 // very difficult. Ideally, we should handle them more gracefully. -if (!EIA->getCond()->EvaluateWithSubstitution( +if

[PATCH] D61734: [clangd] Bump index version and get rid of wrong assertion

2019-05-09 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet created this revision. kadircet added a reviewer: ilya-biryukov. Herald added subscribers: cfe-commits, arphaman, jkorous, MaskRay. Herald added a project: clang. After rL360344 , BackgroundIndex expects symbols with zero refcounts. Therefore existing

[PATCH] D61335: [LibTooling] Add support to Transformer for composing rules as an ordered choice.

2019-05-09 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 198811. ymandel added a comment. Folded CompositeRewriteRule into RewriteRule and added examples to comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61335/new/ https://reviews.llvm.org/D61335 Files:

[clang-tools-extra] r360346 - Fixing a link in the release notes to appease the Sphinx bot.

2019-05-09 Thread Aaron Ballman via cfe-commits
Author: aaronballman Date: Thu May 9 08:00:38 2019 New Revision: 360346 URL: http://llvm.org/viewvc/llvm-project?rev=360346=rev Log: Fixing a link in the release notes to appease the Sphinx bot. Modified: clang-tools-extra/trunk/docs/ReleaseNotes.rst Modified:

[clang-tools-extra] r360348 - Revert r360345 and r360346, as they are not passing the testbots.

2019-05-09 Thread Aaron Ballman via cfe-commits
Author: aaronballman Date: Thu May 9 08:06:41 2019 New Revision: 360348 URL: http://llvm.org/viewvc/llvm-project?rev=360348=rev Log: Revert r360345 and r360346, as they are not passing the testbots.

[clang-tools-extra] r360349 - [clangd] Bump index version and get rid of wrong assertion

2019-05-09 Thread Kadir Cetinkaya via cfe-commits
Author: kadircet Date: Thu May 9 08:07:53 2019 New Revision: 360349 URL: http://llvm.org/viewvc/llvm-project?rev=360349=rev Log: [clangd] Bump index version and get rid of wrong assertion Summary: After rL360344, BackgroundIndex expects symbols with zero refcounts. Therefore existing index

[PATCH] D61734: [clangd] Bump index version and get rid of wrong assertion

2019-05-09 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov accepted this revision. ilya-biryukov 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/D61734/new/ https://reviews.llvm.org/D61734

[PATCH] D56160: [clang-tidy] modernize-use-trailing-return-type check

2019-05-09 Thread Bernhard Manfred Gruber via Phabricator via cfe-commits
bernhardmgruber marked 2 inline comments as done. bernhardmgruber added a comment. @aaron.ballman I do not have commit privileges and I would be very thankful, if you could commit this patch for me! Thank you! Comment at:

[PATCH] D56160: [clang-tidy] modernize-use-trailing-return-type check

2019-05-09 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tidy/modernize/UseTrailingReturnTypeCheck.cpp:203 + if (ContainsQualifiers + ContainsSpecifiers + ContainsSomethingElse > 1) +return {}; + bernhardmgruber wrote: > aaron.ballman wrote: > > This should

r360342 - [OpenCL] Make global ctor init function a kernel

2019-05-09 Thread Anastasia Stulova via cfe-commits
Author: stulova Date: Thu May 9 06:55:44 2019 New Revision: 360342 URL: http://llvm.org/viewvc/llvm-project?rev=360342=rev Log: [OpenCL] Make global ctor init function a kernel We need to be able to enqueue internal function that initializes global constructors on the host side. Therefore it

[PATCH] D61488: [OpenCL] Make global ctor init function a kernel

2019-05-09 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL360342: [OpenCL] Make global ctor init function a kernel (authored by stulova, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit:

[PATCH] D61335: [LibTooling] Add support to Transformer for composing rules as an ordered choice.

2019-05-09 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel added a comment. In D61335#1495324 , @ilya-biryukov wrote: > Sorry for the delay. > I personally like the `RewriteRule::Action` best. Allows to use a rather > common term, while still avoiding any possible confusion. I tried going with

[PATCH] D61438: [ASTImporter] Use llvm::Expected and Error in the importer API

2019-05-09 Thread Gabor Marton via Phabricator via cfe-commits
martong updated this revision to Diff 198824. martong added a comment. - Remove remaining FIXMEs Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61438/new/ https://reviews.llvm.org/D61438 Files: clang/include/clang/AST/ASTImporter.h

[clang-tools-extra] r360345 - Add the modernize-use-trailing-return check to rewrite function signatures to use trailing return types.

2019-05-09 Thread Aaron Ballman via cfe-commits
Author: aaronballman Date: Thu May 9 07:48:17 2019 New Revision: 360345 URL: http://llvm.org/viewvc/llvm-project?rev=360345=rev Log: Add the modernize-use-trailing-return check to rewrite function signatures to use trailing return types. Patch by Bernhard Manfred Gruber. Added:

[PATCH] D56160: [clang-tidy] modernize-use-trailing-return-type check

2019-05-09 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman reopened this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. In D56160#1496594 , @aaron.ballman wrote: > In D56160#1496391 , @bernhardmgruber > wrote: > >

[PATCH] D53866: [Preamble] Stop circular inclusion of main file when building preamble

2019-05-09 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Comment at: lib/Basic/SourceManager.cpp:1594 SourceFileName = llvm::sys::path::filename(SourceFile->getName()); -if (*SourceFileName == llvm::sys::path::filename(MainFile->getName())) { +if (MainFile &&

[PATCH] D61497: [clangd] Introduce a structured hover response

2019-05-09 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. comments on interface again, will take another pass at implementation Comment at: clang-tools-extra/clangd/XRefs.h:65 + /// Fully qualiffied name for the scope containing the Sym. + std::string Scope; + std::string ParentScope;

[PATCH] D60934: [clang] adding explicit(bool) from c++2a

2019-05-09 Thread Tyker via Phabricator via cfe-commits
Tyker marked an inline comment as done. Tyker added inline comments. Comment at: cfe/trunk/lib/Parse/ParseDecl.cpp:3939 + "both or neither of isAlreadyConsumed and " + "RangeEnd needs to be set"); +

[PATCH] D61438: [ASTImporter] Use llvm::Expected and Error in the importer API

2019-05-09 Thread Gabor Marton via Phabricator via cfe-commits
martong updated this revision to Diff 198822. martong marked 3 inline comments as done. martong added a comment. - Remove FIXME and return the error - Use early return where possible and remove redundant else Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[clang-tools-extra] r360344 - [clangd] Count number of references while merging RefSlabs inside FileIndex

2019-05-09 Thread Kadir Cetinkaya via cfe-commits
Author: kadircet Date: Thu May 9 07:22:07 2019 New Revision: 360344 URL: http://llvm.org/viewvc/llvm-project?rev=360344=rev Log: [clangd] Count number of references while merging RefSlabs inside FileIndex Summary: For counting number of references clangd was relying on merging every duplication

[PATCH] D61438: [ASTImporter] Use llvm::Expected and Error in the importer API

2019-05-09 Thread Gabor Marton via Phabricator via cfe-commits
martong marked 8 inline comments as done. martong added inline comments. Comment at: clang/lib/AST/ASTImporter.cpp:5039 + if (!ToOrErr) +// FIXME: return the error? +consumeError(ToOrErr.takeError()); aprantl wrote: > We don't

[PATCH] D56160: [clang-tidy] modernize-use-trailing-return-type check

2019-05-09 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D56160#1496391 , @bernhardmgruber wrote: > @aaron.ballman I do not have commit privileges and I would be very thankful, > if you could commit this patch for me! Thank you! I've commit for you in r360345, thank you for

[PATCH] D61756: Add a __FILE_NAME__ macro.

2019-05-09 Thread Kristina Brooks via Phabricator via cfe-commits
kristina updated this revision to Diff 198894. kristina added a comment. Fix style, remove unnecessary braces, add missing newline. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61756/new/ https://reviews.llvm.org/D61756 Files:

r360374 - NFC, make XFAIL work on macOS correctly for test/Driver/XRay/xray-instrument-os.c

2019-05-09 Thread Alex Lorenz via cfe-commits
Author: arphaman Date: Thu May 9 13:35:41 2019 New Revision: 360374 URL: http://llvm.org/viewvc/llvm-project?rev=360374=rev Log: NFC, make XFAIL work on macOS correctly for test/Driver/XRay/xray-instrument-os.c The test 'test/Driver/XRay/xray-instrument-os.c' is supposed to XFAIL on -darwin

[PATCH] D61756: Add a __FILE_NAME__ macro.

2019-05-09 Thread Shawn Landden via Phabricator via cfe-commits
shawnl requested changes to this revision. shawnl added a comment. This revision now requires changes to proceed. There is no documentation specific to the #include directive. https://docs.microsoft.com/en-us/cpp/preprocessor/hash-include-directive-c-cpp?view=vs-2019 However, fileio treats /

[PATCH] D60974: Clang IFSO driver action.

2019-05-09 Thread Puyan Lotfi via Phabricator via cfe-commits
plotfi updated this revision to Diff 198902. plotfi added a comment. addressing a lot of @compnerd 's feedback. Still lots of templating. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60974/new/ https://reviews.llvm.org/D60974 Files:

[PATCH] D61165: Fix a crash where a [[no_destroy]] destructor was not emitted in an array

2019-05-09 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington updated this revision to Diff 198916. erik.pilkington marked 6 inline comments as done. erik.pilkington added a comment. Address review comments. Also remove the special case where we wouldn't check a destructor for an array in `-fno-exceptions` mode. This seems inconsistent with

[PATCH] D61165: Fix a crash where a [[no_destroy]] destructor was not emitted in an array

2019-05-09 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington added inline comments. Comment at: clang/include/clang/Basic/AttrDocs.td:3897-3900 +This works in almost all cases, but if ``no_destroy`` is applied to a ``static`` +or ``thread_local`` local builtin array variable and exceptions are enabled, the +destructor is

[PATCH] D61646: Include corecrt.h/vcruntime.h to improve MS compatibility

2019-05-09 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added a subscriber: echristo. rnk added a comment. @echristo mentioned that this patch was also causing issues in another freestanding environment where _MSC_VER was defined, but no corecrt.h header existed on the system. So, I think it's likely that we don't want to do this in the long

[PATCH] D61765: [OpenMP][Clang][BugFix] Split declares and math functions inclusion.

2019-05-09 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea created this revision. gtbercea added reviewers: jdoerfert, ABataev, hfinkel, caomhin. Herald added subscribers: cfe-commits, guansong, mgorny. Herald added a project: clang. This patches fixes an issue in which the __clang_cuda_cmath.h header is being included even when cmath or math.h

[PATCH] D61165: Fix a crash where a [[no_destroy]] destructor was not emitted in an array

2019-05-09 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington added inline comments. Comment at: clang/lib/Sema/SemaDeclCXX.cpp:13121-13122 + if (VD->isNoDestroy(getASTContext()) && + !(VD->getType()->isArrayType() && getLangOpts().Exceptions && +VD->isStaticLocal())) return; rjmccall

[PATCH] D61667: Assume `__cxa_allocate_exception` returns an under-aligned memory on Darwin if the version of libc++abi isn't new enough to include the fix in r319123

2019-05-09 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak updated this revision to Diff 198959. ahatanak added a comment. Update the comment in `CheckCXXThrowOperand`. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61667/new/ https://reviews.llvm.org/D61667 Files: include/clang/AST/ASTContext.h

[PATCH] D61709: [NewPM] Port HWASan and Kernel HWASan

2019-05-09 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 198889. leonardchan marked 2 inline comments as done. leonardchan retitled this revision from "[NewPM] Port HWASan" to "[NewPM] Port HWASan and Kernel HWASan". leonardchan edited the summary of this revision. Repository: rG LLVM Github Monorepo

[PATCH] D17741: adds __FILE_BASENAME__ builtin macro

2019-05-09 Thread Kristina Brooks via Phabricator via cfe-commits
kristina abandoned this revision. kristina added a comment. Superseded by D61756 CHANGES SINCE LAST ACTION https://reviews.llvm.org/D17741/new/ https://reviews.llvm.org/D17741 ___ cfe-commits mailing list

[PATCH] D61743: New clang option -MD-filter=prefix to filter files from make dependencies

2019-05-09 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added inline comments. Comment at: lib/Frontend/DependencyFile.cpp:279 + if (DependencyFilter.size() && + strncmp(Filename, DependencyFilter.c_str(), DependencyFilter.size()) == 0) +// Remove dependencies that are prefixed by the Filter string.

[PATCH] D61769: [clang] Regenerate AST matcher docs 

2019-05-09 Thread Stephane Moore via Phabricator via cfe-commits
stephanemoore created this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. The documentation seems to have been manually edited in https://reviews.llvm.org/rGa282bde69e375985edd4c371b79864f617380ad5. This commit regenerates the documentation and commits the

r360365 - [OPENMP]Fix PR41767: diagnose DSA for variables in clauses with default(none).

2019-05-09 Thread Alexey Bataev via cfe-commits
Author: abataev Date: Thu May 9 11:44:53 2019 New Revision: 360365 URL: http://llvm.org/viewvc/llvm-project?rev=360365=rev Log: [OPENMP]Fix PR41767: diagnose DSA for variables in clauses with default(none). If the combined directive has default(none) clause and has clauses for inner directive

[PATCH] D61758: [driver][xray] fix the macOS support checker by supporting -macos triple in addition to -darwin

2019-05-09 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman created this revision. arphaman added a reviewer: dberris. Herald added subscribers: dexonsmith, jkorous. Herald added a project: clang. The previous check incorrectly checked for macOS support by allowing `-darwin` triples only, and `-macos` triple was not supported. Repository: rG

[PATCH] D61667: Assume `__cxa_allocate_exception` returns an under-aligned memory on Darwin if the version of libc++abi isn't new enough to include the fix in r319123

2019-05-09 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak updated this revision to Diff 198939. ahatanak marked 6 inline comments as done. ahatanak added a comment. Herald added a subscriber: aheejin. Address review comments. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61667/new/

[PATCH] D61667: Assume `__cxa_allocate_exception` returns an under-aligned memory on Darwin if the version of libc++abi isn't new enough to include the fix in r319123

2019-05-09 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added inline comments. Comment at: include/clang/Basic/TargetInfo.h:643 + /// runtime, such as those using the Itanium C++ ABI. + virtual unsigned getExnObjectAlignment() const { +// Itanium says that an _Unwind_Exception has to be "double-word"

[PATCH] D60543: [clang] Add matcher for subclasses of Objective-C interfaces 

2019-05-09 Thread Stephane Moore via Phabricator via cfe-commits
stephanemoore updated this revision to Diff 198956. stephanemoore added a comment. Present one potential option for making isDerivedFrom support Objective-C classes. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60543/new/

[PATCH] D60543: [clang] Update isDerivedFrom to support Objective-C classes 

2019-05-09 Thread Stephane Moore via Phabricator via cfe-commits
stephanemoore added a comment. I did some digging and I believe there are two approaches that we can take to extend `isDerivedFrom` to support Objective-C classes. **Option 1: Match on Common Ancestor Declaration Type**: Convert `isDerivedFrom` to match on the common ancestor declaration type,

[PATCH] D61749: [clang-tidy] initial version of readability-static-const-method

2019-05-09 Thread Matthias Gehre via Phabricator via cfe-commits
mgehre created this revision. mgehre added reviewers: alexfh, aaron.ballman. Herald added subscribers: xazax.hun, mgorny. Herald added a project: clang. Finds non-static member functions that can be made ``const`` or ``static``. The check conservatively tries to preserve logical costness in favor

[PATCH] D61749: [clang-tidy] initial version of readability-static-const-method

2019-05-09 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added subscribers: JonasToth, Eugene.Zelenko. Eugene.Zelenko added a comment. @JonasToth tried to implement const check, so probably const and static part should be split. It's hard to tell about state of existing implementation, but you could continue it or at least borrow ideas

[PATCH] D60974: Clang IFSO driver action.

2019-05-09 Thread Puyan Lotfi via Phabricator via cfe-commits
plotfi marked 2 inline comments as done. plotfi added inline comments. Comment at: clang/lib/Frontend/FrontendActions.cpp:223 +for (auto *I : cast(ND)->decls()) + HandleNamedDecl(dyn_cast(I), Symbols, RDO); +return true; compnerd wrote: > Hmm, do we

[PATCH] D61765: [OpenMP][Clang][BugFix] Split declares and math functions inclusion.

2019-05-09 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added a comment. This always includes the declare file but not the define file, correct? Could we have 4 tests that are compiled in target mode with: // with and without math.h/cmath (clang/clang++) #include long abs(long __i) { return (__i < 0 ? -i : i); } Repository:

[PATCH] D61467: [Rewrite] Extend to further accept CharSourceRange

2019-05-09 Thread Joel E. Denny via Phabricator via cfe-commits
jdenny added inline comments. Comment at: clang/unittests/Rewrite/RewriterTest.cpp:1 +//===- unittests/Rewrite/RewriteTest.cpp - RewriteBuffer tests ===// +// Oops. Need to change the description here. Repository: rG LLVM Github Monorepo

[PATCH] D61165: Fix a crash where a [[no_destroy]] destructor was not emitted in an array

2019-05-09 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: clang/include/clang/Basic/AttrDocs.td:3915 +Here, if the construction of `array[9]` fails with an exception, `array[0..8]` +will be destroyed, so the element's destructor needs to be accessible. }]; Probably worth

[PATCH] D61165: Fix a crash where a [[no_destroy]] destructor was not emitted in an array

2019-05-09 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: clang/lib/Sema/SemaDeclCXX.cpp:13121-13122 + if (VD->isNoDestroy(getASTContext()) && + !(VD->getType()->isArrayType() && getLangOpts().Exceptions && +VD->isStaticLocal())) return; erik.pilkington

[PATCH] D61667: Assume `__cxa_allocate_exception` returns an under-aligned memory on Darwin if the version of libc++abi isn't new enough to include the fix in r319123

2019-05-09 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: lib/Sema/SemaExprCXX.cpp:946 + // is larger than the minimum alignment the libc++abi runtime guarantees. + if (Context.getTargetInfo().getTriple().isOSDarwin()) { +CharUnits TypeAlign = Context.getTypeAlignInChars(Ty);

[PATCH] D61621: [X86] Make `x86intrin.h`, `immintrin.h` includable with `-fno-gnu-inline-asm`.

2019-05-09 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, thanks! In D61621#1496978 , @vsapsai wrote: > Didn't use `-fms-compatibility` in the test and it seems to be working fine. > Don't know if it is

r360370 - DR1872: don't allow any calls to virtual functions in constant

2019-05-09 Thread Richard Smith via cfe-commits
Author: rsmith Date: Thu May 9 12:45:49 2019 New Revision: 360370 URL: http://llvm.org/viewvc/llvm-project?rev=360370=rev Log: DR1872: don't allow any calls to virtual functions in constant evaluation. Not even in cases where we would not actually perform virtual dispatch. Modified:

r360369 - Simplify tracking of end of consumed decl-specifier sequence.

2019-05-09 Thread Richard Smith via cfe-commits
Author: rsmith Date: Thu May 9 12:45:46 2019 New Revision: 360369 URL: http://llvm.org/viewvc/llvm-project?rev=360369=rev Log: Simplify tracking of end of consumed decl-specifier sequence. Patch by Tyker! Differential Revision: https://reviews.llvm.org/D60934 Modified:

r360387 - Remember to decay arrays to pointers before checking whether the

2019-05-09 Thread Richard Smith via cfe-commits
Author: rsmith Date: Thu May 9 15:22:48 2019 New Revision: 360387 URL: http://llvm.org/viewvc/llvm-project?rev=360387=rev Log: Remember to decay arrays to pointers before checking whether the left-hand side of an -> operator is a pointer to class type. Modified:

[PATCH] D61765: [OpenMP][Clang][BugFix] Split declares and math functions inclusion.

2019-05-09 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea updated this revision to Diff 198929. gtbercea added a comment. - Remove define. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61765/new/ https://reviews.llvm.org/D61765 Files: lib/Driver/ToolChains/Clang.cpp lib/Headers/CMakeLists.txt

[PATCH] D61467: [Rewrite] Extend to further accept CharSourceRange

2019-05-09 Thread Joel E. Denny via Phabricator via cfe-commits
jdenny added a comment. Ping. This seems like a straight-forward extension to the Rewriter API. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61467/new/ https://reviews.llvm.org/D61467 ___

[PATCH] D61165: Fix a crash where a [[no_destroy]] destructor was not emitted in an array

2019-05-09 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington updated this revision to Diff 198944. erik.pilkington marked an inline comment as done. erik.pilkington added a comment. Rename `hasAccessibleDestructor`. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61165/new/ https://reviews.llvm.org/D61165 Files:

[PATCH] D61750: [Targets] Move soft-float-abi filtering to `initFeatureMap`

2019-05-09 Thread George Burgess IV via Phabricator via cfe-commits
george.burgess.iv created this revision. george.burgess.iv added reviewers: michaelplatings, efriedma. Herald added subscribers: kristof.beyls, javed.absar. Herald added a project: clang. I'm not convinced this is an excellent approach, in part because I'm unclear on where all we expect to

[PATCH] D61756: Add a __FILE_NAME__ macro.

2019-05-09 Thread Kristina Brooks via Phabricator via cfe-commits
kristina created this revision. kristina added reviewers: aaron.ballman, rsmith, rnk. Herald added a project: clang. A much simplified version of D17741 which adds a new builtin macro `__FILE_NAME__` that is similar to `__FILE__` but only renders the last path

[PATCH] D61756: Add a __FILE_NAME__ macro.

2019-05-09 Thread Shawn Landden via Phabricator via cfe-commits
shawnl added inline comments. Comment at: lib/Lex/PPMacroExpansion.cpp:1509 +if (LastSep == StringRef::npos && LangOpts.MicrosoftExt) + LastSep = PLFileName.find_last_of('\\'); + What is the path name uses both \ and / to separate paths?

[PATCH] D61742: [Driver][Windows] Add dependent lib argument for profile instr generate

2019-05-09 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added a comment. Thanks, I would like to do this for the sanitizers as well, since this is a constant pain point for users, who have to come up with an architecture-dependent filename (`clang_rt.asan-dynamic-$arch.lib` or something). Comment at:

[PATCH] D61743: New clang option -MD-filter=prefix to filter files from make dependencies

2019-05-09 Thread Melanie Blower via Phabricator via cfe-commits
mibintc marked an inline comment as done. mibintc added a comment. added an inline comment about the use of strncmp Comment at: lib/Frontend/DependencyFile.cpp:279 + if (DependencyFilter.size() && + strncmp(Filename, DependencyFilter.c_str(), DependencyFilter.size()) ==

[PATCH] D56160: [clang-tidy] modernize-use-trailing-return-type check

2019-05-09 Thread Bernhard Manfred Gruber via Phabricator via cfe-commits
bernhardmgruber updated this revision to Diff 198937. bernhardmgruber marked 3 inline comments as done. bernhardmgruber added a comment. - fixed formatting - fixed function names in tests - added `-fexceptions` to test arguments - fixed type in release notes CHANGES SINCE LAST ACTION

[PATCH] D61165: Fix a crash where a [[no_destroy]] destructor was not emitted in an array

2019-05-09 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington marked 2 inline comments as done. erik.pilkington added inline comments. Comment at: clang/lib/Sema/SemaDeclCXX.cpp:13121-13122 + if (VD->isNoDestroy(getASTContext()) && + !(VD->getType()->isArrayType() && getLangOpts().Exceptions && +

[PATCH] D60543: [clang] Update isDerivedFrom to support Objective-C classes 

2019-05-09 Thread Stephane Moore via Phabricator via cfe-commits
stephanemoore added inline comments. Comment at: clang/unittests/ASTMatchers/ASTMatchersNarrowingTest.cpp:566 + notMatchesObjC("@interface Y @end typedef Y X; @interface Z : X @end", + ZIsDerivedFromX)); + EXPECT_TRUE( (note that there are

[PATCH] D50993: [clangd] Increase stack size of the new threads on macOS

2019-05-09 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. In D50993#1496638 , @Dmitry.Kozhevnikov wrote: > In D50993#1496250 , @ilya-biryukov > wrote: > > > We should definitely land this. > > > > @Dmitry.Kozhevnikov, you don't have commit

[PATCH] D50993: [clangd] Increase stack size of the new threads on macOS

2019-05-09 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. I'd still put it into LLVM to avoid platform-specific code in clangd. Maybe `std::abort()` in the added `...Async` function if threads are disabled? It's a bit unusual, but would allow keeping this function where it belongs. Repository: rCTE Clang Tools Extra

[PATCH] D50993: [clangd] Increase stack size of the new threads on macOS

2019-05-09 Thread Dmitry via Phabricator via cfe-commits
Dmitry.Kozhevnikov added a comment. In D50993#1496946 , @ilya-biryukov wrote: > I'd still put it into LLVM to avoid platform-specific code in clangd. > Maybe `std::abort()` in the added `...Async` function if threads are > disabled? It's a bit

r360363 - Specify target triple to fix the tests I committed in r360359 that are

2019-05-09 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Thu May 9 11:32:16 2019 New Revision: 360363 URL: http://llvm.org/viewvc/llvm-project?rev=360363=rev Log: Specify target triple to fix the tests I committed in r360359 that are still failing. Modified: cfe/trunk/test/CodeGenObjC/externally-initialized-selectors.m

[PATCH] D60974: Clang IFSO driver action.

2019-05-09 Thread Puyan Lotfi via Phabricator via cfe-commits
plotfi marked 2 inline comments as done. plotfi added inline comments. Comment at: clang/lib/Driver/ToolChains/Clang.cpp:3590 +Twine("-interface-stubs-version=") + +Args.getLastArgValue(options::OPT_ifso_version_EQ))); + } compnerd

[PATCH] D61621: [X86] Make `x86intrin.h`, `immintrin.h` includable with `-fno-gnu-inline-asm`.

2019-05-09 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai updated this revision to Diff 198875. vsapsai added a comment. - Improve `-fno-gnu-inline-asm` support for MS-compatibility too. Didn't use `-fms-compatibility` in the test and it seems to be working fine. Don't know if it is accidental and if I should add the flag. CHANGES SINCE LAST

r360362 - [OPENMP]Fix PR41768: check DSA for globals with default(none) clauses.

2019-05-09 Thread Alexey Bataev via cfe-commits
Author: abataev Date: Thu May 9 11:14:57 2019 New Revision: 360362 URL: http://llvm.org/viewvc/llvm-project?rev=360362=rev Log: [OPENMP]Fix PR41768: check DSA for globals with default(none) clauses. If the default(none) was specified for the construct, we might miss diagnostic for the globals

[PATCH] D61497: [clangd] Introduce a structured hover response

2019-05-09 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. Main comment is that I think the code is doing too much work to exactly reproduce the current output, and include as much information as possible. Minimizing the diff is good all else equal, but one of the goals here is to have richer hovercards that are more

[PATCH] D53866: [Preamble] Stop circular inclusion of main file when building preamble

2019-05-09 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov accepted this revision. ilya-biryukov marked an inline comment as done. ilya-biryukov added a comment. This revision is now accepted and ready to land. LGTM. See the nit about naming of an error, though Comment at: include/clang/Basic/DiagnosticLexKinds.td:429

[PATCH] D50993: [clangd] Increase stack size of the new threads on macOS

2019-05-09 Thread Dmitry via Phabricator via cfe-commits
Dmitry.Kozhevnikov added a comment. In D50993#1496250 , @ilya-biryukov wrote: > We should definitely land this. > > @Dmitry.Kozhevnikov, you don't have commit access, right? Should we land > these two revisions for you? The depending review was never

[PATCH] D61739: check_clang_tidy.py now passes `-format-style=none` to clang_tidy

2019-05-09 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh accepted this revision. alexfh added a comment. This revision is now accepted and ready to land. LG, thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61739/new/ https://reviews.llvm.org/D61739

[PATCH] D59887: [Syntax] Introduce TokenBuffer, start clangToolingSyntax library

2019-05-09 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Comment at: clang/lib/Tooling/Syntax/Tokens.cpp:130 + OS << llvm::formatv( + "['{0}'_{1}, '{2}'_{3}) => ['{4}'_{5}, '{6}'_{7})\n", + PrintToken(File.SpelledTokens[M.BeginSpelled]), M.BeginSpelled,

[PATCH] D59887: [Syntax] Introduce TokenBuffer, start clangToolingSyntax library

2019-05-09 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov updated this revision to Diff 198862. ilya-biryukov marked 6 inline comments as done. ilya-biryukov added a comment. - Move filling the gaps at the end of files to a separate function Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D61742: [Driver][Windows] Add dependent lib argument for profile instr generate

2019-05-09 Thread Russell Gallop via Phabricator via cfe-commits
russell.gallop created this revision. russell.gallop added reviewers: rnk, bogner. russell.gallop added a project: clang. This is needed so lld-link can find clang_rt.profile when self hosting on Windows with PGO. Trying to self host on Windows with PGO runs into undefined symbols as lld-link

[PATCH] D61747: [clang-tidy] remove default header-filter for run-clang-tidy

2019-05-09 Thread Torbjörn Klatt via Phabricator via cfe-commits
torbjoernk created this revision. torbjoernk added reviewers: alexfh, bkramer. torbjoernk added a project: clang-tools-extra. Herald added subscribers: cfe-commits, xazax.hun. Herald added a project: clang. run-clang-tidy.py was enforcing '-header-filter' parameter with an unfortunate default

r360359 - [CodeGen][ObjC] Remove the leading `l_` from ObjC symbols and make

2019-05-09 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Thu May 9 10:43:52 2019 New Revision: 360359 URL: http://llvm.org/viewvc/llvm-project?rev=360359=rev Log: [CodeGen][ObjC] Remove the leading `l_` from ObjC symbols and make private symbols in the __DATA segment internal. This prevents the linker from removing the symbol

r360361 - Specify ObjC runtime to fix the tests I committed in r360359 that are

2019-05-09 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Thu May 9 11:05:17 2019 New Revision: 360361 URL: http://llvm.org/viewvc/llvm-project?rev=360361=rev Log: Specify ObjC runtime to fix the tests I committed in r360359 that are failing. Modified: cfe/trunk/test/CodeGenObjC/externally-initialized-selectors.m

[PATCH] D61734: [clangd] Bump index version and get rid of wrong assertion

2019-05-09 Thread Kadir Cetinkaya via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rCTE360349: [clangd] Bump index version and get rid of wrong assertion (authored by kadircet, committed by ). Changed prior to commit: https://reviews.llvm.org/D61734?vs=198825=198828#toc Repository:

[PATCH] D28462: clang-format: Add new style option AlignConsecutiveMacros

2019-05-09 Thread Micah S. via Phabricator via cfe-commits
micah-s added a comment. @djasper @klimek @krasimir @sammccall @enyquist Can I trouble you for an update? In D28462#1492600 , @jkorous wrote: > Hi @VelocityRa, just FYI - it's considered fine to ping your reviewers once > per week here if you've

  1   2   >