[PATCH] D58743: Handle built-in when importing SourceLocation and FileID

2019-02-27 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. Is there a test missing here? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58743/new/ https://reviews.llvm.org/D58743 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailma

[PATCH] D58729: Emit boxed expression as a compile-time constant if the expression inside the parentheses is a string literal

2019-02-27 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: lib/Sema/SemaExprObjC.cpp:534 +NSStringPointer, NSStringPointer); +return new (Context) ObjCBoxedExpr(SL, BoxedType, nullptr, SR); + } ahatanak wrote: > rjmccall wrote: > > You're implicitly dro

[PATCH] D58742: [WebAssembly] Remove uses of ThreadModel

2019-02-27 Thread Heejin Ahn via Phabricator via cfe-commits
aheejin added inline comments. Comment at: clang/include/clang/Driver/ToolChain.h:456 /// getThreadModel() - Which thread model does this target use? - virtual std::string getThreadModel(const llvm::opt::ArgList &) const { -return "posix"; - } + virtual std::string getT

[PATCH] D58757: Add a version of the pass_object_size attribute that works with builtin_dynamic_object_size

2019-02-27 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington created this revision. erik.pilkington added reviewers: aaron.ballman, george.burgess.iv, rsmith. Herald added subscribers: jdoerfert, kristina, dexonsmith, jkorous. Herald added a project: clang. This attribute, named `pass_dynamic_object_size` has the same semantics as pass_obje

[PATCH] D58729: Emit boxed expression as a compile-time constant if the expression inside the parentheses is a string literal

2019-02-27 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak marked an inline comment as done. ahatanak added inline comments. Comment at: lib/Sema/SemaExprObjC.cpp:534 +NSStringPointer, NSStringPointer); +return new (Context) ObjCBoxedExpr(SL, BoxedType, nullptr, SR); + } rjmccall wrote:

[PATCH] D58742: [WebAssembly] Remove uses of ThreadModel

2019-02-27 Thread Thomas Lively via Phabricator via cfe-commits
tlively marked an inline comment as done. tlively added a comment. In D58742#1413077 , @sunfish wrote: > This is still a little confusing to me. -matomic is supposed to be a > subtarget flag, stating that the wasm implementation we will run on supports >

[PATCH] D45978: dllexport const variables must have external linkage.

2019-02-27 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: lib/Sema/SemaDecl.cpp:5971 auto *VD = dyn_cast(&ND); -if (!ND.isExternallyVisible() || (VD && VD->isStaticLocal())) { +NamespaceDecl *NS = NULL; +if (VD) s/NULL/nullptr Also, I think this should b

[PATCH] D58742: [WebAssembly] Remove uses of ThreadModel

2019-02-27 Thread Dan Gohman via Phabricator via cfe-commits
sunfish added a comment. This is still a little confusing to me. -matomic is supposed to be a subtarget flag, stating that the wasm implementation we will run on supports atomic instructions. -mthread-model posix is about the C++ interpretation -- what style implementation of memory model do we

[PATCH] D58418: [clang][DirectoryWatcher] Upstream DirectoryWatcher

2019-02-27 Thread Jan Korous via Phabricator via cfe-commits
jkorous added a comment. @xbolva00 I prefer to keep it here for now. I suggest we wait with upstreaming until an actual need for use in some other project arises. This is what we basically did with VFS. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58418/new/ https://reviews.llvm.org/

[PATCH] D58751: Order File Instrumentation: add clang support for -forder-file-instrumentation

2019-02-27 Thread Manman Ren via Phabricator via cfe-commits
manmanren created this revision. manmanren added reviewers: davidxl, beanz, dexonsmith. Herald added subscribers: cfe-commits, jdoerfert. Herald added a project: clang. When -forder-file-instrumentation is on, we pass llvm flag to enable the order file instrumentation pass. Repository: rC Cla

r355061 - [clang][index-while-building][NFC] Comment about implementation detail in FileIndexRecord

2019-02-27 Thread Jan Korous via cfe-commits
Author: jkorous Date: Wed Feb 27 17:12:27 2019 New Revision: 355061 URL: http://llvm.org/viewvc/llvm-project?rev=355061&view=rev Log: [clang][index-while-building][NFC] Comment about implementation detail in FileIndexRecord Modified: cfe/trunk/lib/Index/FileIndexRecord.cpp Modified: cfe/tru

r355058 - Ensure that set constrained asm operands are not affected by truncation.

2019-02-27 Thread Joerg Sonnenberger via cfe-commits
Author: joerg Date: Wed Feb 27 16:55:09 2019 New Revision: 355058 URL: http://llvm.org/viewvc/llvm-project?rev=355058&view=rev Log: Ensure that set constrained asm operands are not affected by truncation. Modified: cfe/trunk/include/clang/Basic/TargetInfo.h cfe/trunk/test/Sema/inline-asm-

[PATCH] D58742: [WebAssembly] Remove uses of ThreadModel

2019-02-27 Thread Heejin Ahn via Phabricator via cfe-commits
aheejin accepted this revision. aheejin added a comment. This looks a nice improvement! Thank you. Comment at: clang/include/clang/Driver/ToolChain.h:456 /// getThreadModel() - Which thread model does this target use? - virtual std::string getThreadModel(const llvm::opt::Ar

[PATCH] D58744: [CodeGen] Fix some broken IR generated by -fsanitize=unsigned-integer-overflow

2019-02-27 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL355054: [CodeGen] Fix some broken IR generated by -fsanitize=unsigned-integer-overflow (authored by epilk, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed pr

r355054 - [CodeGen] Fix some broken IR generated by -fsanitize=unsigned-integer-overflow

2019-02-27 Thread Erik Pilkington via cfe-commits
Author: epilk Date: Wed Feb 27 16:47:55 2019 New Revision: 355054 URL: http://llvm.org/viewvc/llvm-project?rev=355054&view=rev Log: [CodeGen] Fix some broken IR generated by -fsanitize=unsigned-integer-overflow I think the author of the function assumed that `GetInsertBlock()` wouldn't change fro

[PATCH] D58749: [index-while-building] IndexRecordHasher

2019-02-27 Thread Jan Korous via Phabricator via cfe-commits
jkorous created this revision. jkorous added reviewers: nathawes, akyrtzi, arphaman, dexonsmith, ioeric, malaperle. Herald added subscribers: cfe-commits, jdoerfert, mgorny. Herald added a project: clang. Another piece of index-while-building functionality. RFC: http://lists.llvm.org/pipermail/cf

[PATCH] D58744: [CodeGen] Fix some broken IR generated by -fsanitize=unsigned-integer-overflow

2019-02-27 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak accepted this revision. ahatanak added a comment. This revision is now accepted and ready to land. LGTM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58744/new/ https://reviews.llvm.org/D58744 ___ cfe-commits mailing list cfe-commi

[PATCH] D58744: [CodeGen] Fix some broken IR generated by -fsanitize=unsigned-integer-overflow

2019-02-27 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington updated this revision to Diff 188645. erik.pilkington added a comment. Use `atomicPHI->getParent()` instead of tracking the block. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58744/new/ https://reviews.llvm.org/D58744 Files: clang/lib/CodeGen/CGExprScalar.cpp clan

[PATCH] D58744: [CodeGen] Fix some broken IR generated by -fsanitize=unsigned-integer-overflow

2019-02-27 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington marked an inline comment as done. erik.pilkington added inline comments. Comment at: clang/lib/CodeGen/CGExprScalar.cpp:2921 +atomicPHI->addIncoming(old, curBlock); +Builder.CreateCondBr(success, contBB, atomicOpBB); Builder.SetInsertPoint(contBB); --

[PATCH] D58744: [CodeGen] Fix some broken IR generated by -fsanitize=unsigned-integer-overflow

2019-02-27 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added inline comments. Comment at: clang/test/CodeGen/sanitize-atomic-int-overflow.c:3 + +_Atomic(unsigned) atomic; + ahatanak wrote: > It's probably better to add some check strings here. I see this has been fixed in the updated patch. CHANGES SINCE L

[PATCH] D58744: [CodeGen] Fix some broken IR generated by -fsanitize=unsigned-integer-overflow

2019-02-27 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added inline comments. Comment at: clang/lib/CodeGen/CGExprScalar.cpp:2921 +atomicPHI->addIncoming(old, curBlock); +Builder.CreateCondBr(success, contBB, atomicOpBB); Builder.SetInsertPoint(contBB); Would passing `atomicPHI->getParent()` ins

[PATCH] D58731: [clang-tidy] added cppcoreguidelines-explicit-virtual-functions

2019-02-27 Thread Lewis Clark via Phabricator via cfe-commits
lewmpk updated this revision to Diff 188642. lewmpk added a comment. cleaned up documentation CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58731/new/ https://reviews.llvm.org/D58731 Files: clang-tidy/cppcoreguidelines/CppCoreGuidelinesTidyModule.cpp clang-tidy/modernize/UseOverrid

[PATCH] D58731: [clang-tidy] added cppcoreguidelines-explicit-virtual-functions

2019-02-27 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: docs/clang-tidy/checks/modernize-use-override.rst:5 == Will be good idea to remove duplicated empty line. Comment at: docs/clang-tidy/checks/modernize-use-override.rst:1

[PATCH] D58744: [CodeGen] Fix some broken IR generated by -fsanitize=unsigned-integer-overflow

2019-02-27 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington updated this revision to Diff 188641. erik.pilkington added a comment. Use FileCheck in the test, NFC. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58744/new/ https://reviews.llvm.org/D58744 Files: clang/lib/CodeGen/CGExprScalar.cpp clang/test/CodeGen/sanitize-atom

[PATCH] D58743: Handle built-in when importing SourceLocation and FileID

2019-02-27 Thread Raphael Isemann via Phabricator via cfe-commits
teemperor requested changes to this revision. teemperor added a comment. This revision now requires changes to proceed. I think the idea of the patch is right. Not sure tough if having Import take a second parameter is consistent with the other Import functions (and if that even matters). ===

[PATCH] D58742: [WebAssembly] Remove uses of ThreadModel

2019-02-27 Thread Thomas Lively via Phabricator via cfe-commits
tlively added a comment. I'll wait and see if @aheejin has any concerns before landing. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58742/new/ https://reviews.llvm.org/D58742 ___ cfe-commits mailing

[PATCH] D58742: [WebAssembly] Remove uses of ThreadModel

2019-02-27 Thread Thomas Lively via Phabricator via cfe-commits
tlively marked an inline comment as done. tlively added inline comments. Comment at: llvm/test/CodeGen/WebAssembly/atomic-mem-consistency.ll:1 -; RUN: not llc < %s -asm-verbose=false -disable-wasm-fallthrough-return-opt +; RUN: llc < %s -asm-verbose=false -disable-wasm-fallthroug

[PATCH] D58731: [clang-tidy] added cppcoreguidelines-explicit-virtual-functions

2019-02-27 Thread Lewis Clark via Phabricator via cfe-commits
lewmpk updated this revision to Diff 188638. lewmpk added a comment. - fixed tests - fixed typo in documentation CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58731/new/ https://reviews.llvm.org/D58731 Files: clang-tidy/cppcoreguidelines/CppCoreGuidelinesTidyModule.cpp clang-tidy

[PATCH] D58737: [InstrProf] Use separate comdat group for data and counters

2019-02-27 Thread Reid Kleckner via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL355044: [InstrProf] Use separate comdat group for data and counters (authored by rnk, committed by ). Herald added a subscriber: delcypher. Changed prior to commit: https://reviews.llvm.org/D58737?vs=18

r355044 - [InstrProf] Use separate comdat group for data and counters

2019-02-27 Thread Reid Kleckner via cfe-commits
Author: rnk Date: Wed Feb 27 15:38:44 2019 New Revision: 355044 URL: http://llvm.org/viewvc/llvm-project?rev=355044&view=rev Log: [InstrProf] Use separate comdat group for data and counters Summary: I hadn't realized that instrumentation runs before inlining, so we can't use the function as the c

[PATCH] D58742: [WebAssembly] Remove uses of ThreadModel

2019-02-27 Thread Sam Clegg via Phabricator via cfe-commits
sbc100 added a comment. I certainly like that llc now does the right thing by default! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58742/new/ https://reviews.llvm.org/D58742 ___ cfe-commits mailing l

[PATCH] D58742: [WebAssembly] Remove uses of ThreadModel

2019-02-27 Thread Sam Clegg via Phabricator via cfe-commits
sbc100 added a comment. I think I like this. We may find a reason down the line to allow passive to be set per-segment, but now keeping it simple and lettings the linker decide makes sense. Comment at: llvm/test/CodeGen/WebAssembly/atomic-mem-consistency.ll:1 -; RUN: not llc

[PATCH] D58731: [clang-tidy] added cppcoreguidelines-explicit-virtual-functions

2019-02-27 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added a comment. In D58731#1412843 , @alexfh wrote: > In D58731#1412831 , @lewmpk wrote: > > > I'm trying to find a way to run the test. If someone else has already > > tested it then yes please. > > > If yo

[PATCH] D58737: [InstrProf] Use separate comdat group for data and counters

2019-02-27 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added a comment. In D58737#1412847 , @xur wrote: > lgtm. > > BTW, I'm in the process of committing D54175 > . After that patch, PGO instrumentation can > be called after the main inlining. I don't think it will confli

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

2019-02-27 Thread Micah S. via Phabricator via cfe-commits
micah-s added a comment. In D28462#1412556 , @MyDeveloperDay wrote: > For those wishing to test the effectiveness of unlanded revisions like this > and to reduce the amount of time between Windows snapshot builds > (https://llvm.org/builds/), I have for

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

2019-02-27 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. In D28462#1407239 , @micah-s wrote: > ClamAV recently started using clang-format. We published this blog post > about how we're using it: > https://blog.clamav.net/2019/02/clamav-adopts-clang-format.html One of the > th

r355008 - Support framework import/include auto-completion

2019-02-27 Thread David Goldman via cfe-commits
Author: dgoldman Date: Wed Feb 27 09:40:33 2019 New Revision: 355008 URL: http://llvm.org/viewvc/llvm-project?rev=355008&view=rev Log: Support framework import/include auto-completion Frameworks filesystem representations: UIKit.framework/Headers/%header% Framework import format: #import T

[PATCH] D58737: [InstrProf] Use separate comdat group for data and counters

2019-02-27 Thread Rong Xu via Phabricator via cfe-commits
xur accepted this revision. xur added a comment. This revision is now accepted and ready to land. lgtm. BTW, I'm in the process of committing D54175 . After that patch, PGO instrumentation can be called after the main inlining. I don't think it will conflict any

[PATCH] D58737: [InstrProf] Use separate comdat group for data and counters

2019-02-27 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added a comment. Oops, forgot to respond to this... In D58737#1412734 , @vsk wrote: > I'm confused by this wording re: comdats in the LangRef: "All global objects > that specify this key will only end up in the final object file if the linker > choo

[PATCH] D58731: [clang-tidy] added cppcoreguidelines-explicit-virtual-functions

2019-02-27 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added a comment. In D58731#1412831 , @lewmpk wrote: > I'm trying to find a way to run the test. If someone else has already tested > it then yes please. If you've set up the build with ninja, `ninja check-clang-tools` should do the right thing.

[PATCH] D58744: [CodeGen] Fix some broken IR generated by -fsanitize=unsigned-integer-overflow

2019-02-27 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington created this revision. erik.pilkington added reviewers: rjmccall, arphaman, ahatanak. Herald added subscribers: jdoerfert, jfb, dexonsmith, jkorous. Herald added a project: clang. I think the author of the function assumed that `GetInsertBlock()` wouldn't change from where `atomic

[PATCH] D58731: [clang-tidy] added cppcoreguidelines-explicit-virtual-functions

2019-02-27 Thread Lewis Clark via Phabricator via cfe-commits
lewmpk added a comment. I'm trying to find a way to run the test. If someone else has already tested it then yes please. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58731/new/ https://reviews.llvm.org/D58731 ___ cfe-commits mailing list

[PATCH] D58743: Handle built-in when importing SourceLocation and FileID

2019-02-27 Thread Shafik Yaghmour via Phabricator via cfe-commits
shafik created this revision. shafik added reviewers: martong, a.sidorin, teemperor, aaron.ballman. Herald added subscribers: jdoerfert, rnkovacs. Currently when we see a built-in we try and import the include location. Instead what we do now is find the buffer like we do for the invalid case and

[PATCH] D58737: [InstrProf] Use separate comdat group for data and counters

2019-02-27 Thread Reid Kleckner via Phabricator via cfe-commits
rnk updated this revision to Diff 188635. rnk marked an inline comment as done. rnk added a comment. - share code Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58737/new/ https://reviews.llvm.org/D58737 Files: clang/test/Profile/cxx-templates.cp

[PATCH] D58742: [WebAssembly] Remove uses of ThreadModel

2019-02-27 Thread Thomas Lively via Phabricator via cfe-commits
tlively created this revision. tlively added reviewers: aheejin, sbc100, dschuff. Herald added subscribers: llvm-commits, cfe-commits, jdoerfert, jfb, rupprecht, dexonsmith, steven_wu, sunfish, hiraditya, jgravelle-google, mehdi_amini. Herald added projects: clang, LLVM. In the clang UI, replaces

[PATCH] D58731: [clang-tidy] added cppcoreguidelines-explicit-virtual-functions

2019-02-27 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. Looks good! Do you need someone to commit the patch for you? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58731/new/ https://reviews.llvm.org/D58731 __

[PATCH] D58737: [InstrProf] Use separate comdat group for data and counters

2019-02-27 Thread Reid Kleckner via Phabricator via cfe-commits
rnk marked 2 inline comments as done. rnk added a comment. In D58737#1412734 , @vsk wrote: > I'm confused by this wording re: comdats in the LangRef: "All global objects > that specify this key will only end up in the final object file if the linker > ch

[PATCH] D54395: [clang-tidy] implement utility-function to add 'const' to variables

2019-02-27 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added a comment. A few more comments. Comment at: clang-tidy/utils/FixItHintUtils.cpp:83 +return (llvm::Twine(' ') + +llvm::Twine(DeclSpec::getSpecifierName(Qualifier))) +.str(); The first operand being llvm::Twine is enough for t

[PATCH] D58731: [clang-tidy] added cppcoreguidelines-explicit-virtual-functions

2019-02-27 Thread Lewis Clark via Phabricator via cfe-commits
lewmpk added a comment. thanks for the feedback everyone (and the warm welcome) CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58731/new/ https://reviews.llvm.org/D58731 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.l

[PATCH] D58737: [InstrProf] Use separate comdat group for data and counters

2019-02-27 Thread Rong Xu via Phabricator via cfe-commits
xur added inline comments. Comment at: llvm/lib/Transforms/Instrumentation/InstrProfiling.cpp:756 + // For COFF, the comdat group name must be the name of a symbol in the + // group. Use the counter variable name. + Cmdt = M->getOrInsertComdat( So

[PATCH] D58731: [clang-tidy] added cppcoreguidelines-explicit-virtual-functions

2019-02-27 Thread Lewis Clark via Phabricator via cfe-commits
lewmpk updated this revision to Diff 188628. lewmpk added a comment. addressed comments CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58731/new/ https://reviews.llvm.org/D58731 Files: clang-tidy/cppcoreguidelines/CppCoreGuidelinesTidyModule.cpp clang-tidy/modernize/UseOverrideCheck

[PATCH] D57087: [clang-tidy] add OverrideMacro to modernize-use-override check

2019-02-27 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. Sorry for the delay. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57087/new/ https://reviews.llvm.org/D57087 ___ cfe-commits mailin

[PATCH] D58737: [InstrProf] Use separate comdat group for data and counters

2019-02-27 Thread Vedant Kumar via Phabricator via cfe-commits
vsk added a comment. I'm confused by this wording re: comdats in the LangRef: "All global objects that specify this key will only end up in the final object file if the linker chooses that key over some other key". Why can multiple global objects with the same comdat key end up in the final obj

[PATCH] D58606: [clang-tidy] misc-string-integer-assignment: fix false positive

2019-02-27 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh accepted this revision. alexfh added a comment. LG. Thanks for improving this check! Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58606/new/ https://reviews.llvm.org/D58606 ___ cfe-commits maili

[PATCH] D58731: [clang-tidy] added cppcoreguidelines-explicit-virtual-functions

2019-02-27 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added inline comments. Comment at: test/clang-tidy/modernize-use-override-no-destructors.cpp:6 +struct Base { + virtual ~Base(){}; + virtual void f(){}; Remove the semicolons after methods. Clang-format the test (but ensure clang-format doesn't break co

[PATCH] D58731: [clang-tidy] added cppcoreguidelines-explicit-virtual-functions

2019-02-27 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added inline comments. Comment at: clang-tidy/modernize/UseOverrideCheck.h:23 + : ClangTidyCheck(Name, Context), +IgnoreDestructors(Options.get("IgnoreDestructors", false)) {} void registerMatchers(ast_matchers::MatchFinder *Finder) override; --

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

2019-02-27 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. In D56160#1412701 , @bernhardmgruber wrote: > - renamed the check to modernize-use-trailing-return-type Thanks! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56160/new/ https://reviews.llvm.org/D56160 __

[PATCH] D58731: [clang-tidy] added cppcoreguidelines-explicit-virtual-functions

2019-02-27 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added a comment. Thank you for the contribution! Please see the comments inline. Comment at: clang-tidy/modernize/UseOverrideCheck.cpp:22 // Only register the matcher for C++11. - if (getLangOpts().CPlusPlus11) -Finder->addMatcher(cxxMethodDecl(isOverride()).bind

[PATCH] D58731: [clang-tidy] added cppcoreguidelines-explicit-virtual-functions

2019-02-27 Thread Lewis Clark via Phabricator via cfe-commits
lewmpk marked 2 inline comments as done and an inline comment as not done. lewmpk added inline comments. Comment at: clang-tidy/modernize/UseOverrideCheck.h:23 + : ClangTidyCheck(Name, Context), +IgnoreDestructors(Options.get("IgnoreDestructors", false)) {} void r

[PATCH] D58731: [clang-tidy] added cppcoreguidelines-explicit-virtual-functions

2019-02-27 Thread Lewis Clark via Phabricator via cfe-commits
lewmpk updated this revision to Diff 188622. lewmpk marked an inline comment as done. lewmpk added a comment. - addressed comments - provided tests - updated documentation - updated release notes CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58731/new/ https://reviews.llvm.org/D58731

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

2019-02-27 Thread Bernhard Manfred Gruber via Phabricator via cfe-commits
bernhardmgruber added inline comments. Comment at: clang-tidy/modernize/UseTrailingReturnCheck.cpp:335 + StringRef ReturnType = tooling::fixit::getText(ReturnTypeCVRange, Ctx); + StringRef Auto = std::isspace(*ReturnType.end()) // FIXME (dereferencing end) +

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

2019-02-27 Thread Bernhard Manfred Gruber via Phabricator via cfe-commits
bernhardmgruber updated this revision to Diff 188621. bernhardmgruber marked 4 inline comments as done. bernhardmgruber retitled this revision from "[clang-tidy] modernize-use-trailing-return check" to "[clang-tidy] modernize-use-trailing-return-type check". bernhardmgruber added a comment. - re

[PATCH] D56943: [clang-format][NFC] Allow getLLVMStyle() to take a language

2019-02-27 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay accepted this revision. MyDeveloperDay added a comment. This revision is now accepted and ready to land. I think I've seen you need this for another patch, so in the absence of the code owners this LGTM, and thank you for removing all the changes to the tests in the previous diff.

[PATCH] D58724: [gnustep-objc] Make the GNUstep v2 ABI work for Windows DLLs.

2019-02-27 Thread Dustin L. Howett via Phabricator via cfe-commits
DHowett-MSFT added a comment. This looks great, and takes up the parts of my patch that I cared about. Thank you for doing this. My primary concern is that the patch includes my "early init" changes -- while I support it and think it's the right solution, especially where it reduces double indi

[PATCH] D58537: lib/Header: Simplify CMakeLists.txt

2019-02-27 Thread Shoaib Meenai via Phabricator via cfe-commits
smeenai accepted this revision. smeenai added a comment. LGTM, thanks! Comment at: clang/lib/Headers/CMakeLists.txt:136 list(APPEND out_files ${dst}) + # The list function only updates out_files in the current scope. We need + # call set in order to also update the variab

[PATCH] D58478: [index-while-building] FileIndexRecord

2019-02-27 Thread Jan Korous via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC355035: [clang][index-while-building] FileIndexRecord (authored by jkorous, committed by ). Changed prior to commit: https://reviews.llvm.org/D58478?vs=187863&id=188614#toc Repository: rC Clang CHAN

r355035 - [clang][index-while-building] FileIndexRecord

2019-02-27 Thread Jan Korous via cfe-commits
Author: jkorous Date: Wed Feb 27 13:47:40 2019 New Revision: 355035 URL: http://llvm.org/viewvc/llvm-project?rev=355035&view=rev Log: [clang][index-while-building] FileIndexRecord Basic data structures for index Tests are missing from this patch - will be covered properly by tests for the whole

r355036 - [clang][index-while-building][NFC] FileIndexRecord - Comments, replace auto with type

2019-02-27 Thread Jan Korous via cfe-commits
Author: jkorous Date: Wed Feb 27 13:48:02 2019 New Revision: 355036 URL: http://llvm.org/viewvc/llvm-project?rev=355036&view=rev Log: [clang][index-while-building][NFC] FileIndexRecord - Comments, replace auto with type Differential Revision: https://reviews.llvm.org/D58478 Modified: cfe/tr

r355033 - Use Secure PLT as default on NetBSD/PowerPC.

2019-02-27 Thread Joerg Sonnenberger via cfe-commits
Author: joerg Date: Wed Feb 27 13:46:01 2019 New Revision: 355033 URL: http://llvm.org/viewvc/llvm-project?rev=355033&view=rev Log: Use Secure PLT as default on NetBSD/PowerPC. Modified: cfe/trunk/lib/Driver/ToolChains/Arch/PPC.cpp cfe/trunk/test/Driver/netbsd.c Modified: cfe/trunk/lib/D

[PATCH] D58737: [InstrProf] Use separate comdat group for data and counters

2019-02-27 Thread Reid Kleckner via Phabricator via cfe-commits
rnk created this revision. rnk added reviewers: xur, vsk. Herald added subscribers: Sanitizers, cfe-commits, hiraditya, eraman. Herald added projects: clang, Sanitizers, LLVM. I hadn't realized that instrumentation runs before inlining, so we can't use the function as the comdat group. Doing so ca

[PATCH] D58478: [index-while-building] FileIndexRecord

2019-02-27 Thread Nathan Hawes via Phabricator via cfe-commits
nathawes accepted this revision. nathawes added a comment. This revision is now accepted and ready to land. Looks good to me. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58478/new/ https://reviews.llvm.org/D58478 ___ cfe-commits mailing l

[PATCH] D58731: [clang-tidy] added cppcoreguidelines-explicit-virtual-functions

2019-02-27 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. Please resubmit this patch with full context git diff --cached -U99 > patch_to_submitt.diff You need to add some documention describing the new option into the check in docs/clang-tidy/checks/modernize .rst Repository: rCTE Clang Tools Extra CHANGE

[PATCH] D58729: Emit boxed expression as a compile-time constant if the expression inside the parentheses is a string literal

2019-02-27 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: lib/CodeGen/CGExprConstant.cpp:1793 + "this boxed expression can't be emitted as a compile-time constant"); + return emitConstantObjCStringLiteral(cast(E->getSubExpr()), + E->getType(), CGM

r355027 - [OPENMP]Delay emission of the error for unsupported types.

2019-02-27 Thread Alexey Bataev via cfe-commits
Author: abataev Date: Wed Feb 27 12:29:45 2019 New Revision: 355027 URL: http://llvm.org/viewvc/llvm-project?rev=355027&view=rev Log: [OPENMP]Delay emission of the error for unsupported types. If the type is unsupported on the device side, it still must be emitted, but we should emit errors for o

[PATCH] D58478: [index-while-building] FileIndexRecord

2019-02-27 Thread Jan Korous via Phabricator via cfe-commits
jkorous added a comment. ping -c 1 CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58478/new/ https://reviews.llvm.org/D58478 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2019-02-27 Thread Hyrum Wright via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rCTE355024: [clang-tidy] Add the abseil-time-subtraction check (authored by hwright, committed by ). Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58137/new/ h

[clang-tools-extra] r355024 - [clang-tidy] Add the abseil-time-subtraction check

2019-02-27 Thread Hyrum Wright via cfe-commits
Author: hwright Date: Wed Feb 27 12:08:50 2019 New Revision: 355024 URL: http://llvm.org/viewvc/llvm-project?rev=355024&view=rev Log: [clang-tidy] Add the abseil-time-subtraction check Differential Revision: https://reviews.llvm.org/D58137 Added: clang-tools-extra/trunk/clang-tidy/abseil/Tim

[PATCH] D58731: [clang-tidy] added cppcoreguidelines-explicit-virtual-functions

2019-02-27 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added a comment. I think this change is worth mentioning in the release notes as well (cte/docs/ReleaseNotes.rst) Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58731/new/ https://reviews.llvm.org/D58731

[PATCH] D58731: [clang-tidy] added cppcoreguidelines-explicit-virtual-functions

2019-02-27 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added a comment. Welcome to the LLVM community and thank you for the patch lewmpk! Please add unit tests for the changes you made to the check. They live in `clang-tools-extra/test/clang-tidy/modernize-`. It is common to add a additional test-file to ensure the configuration option

[PATCH] D58731: [clang-tidy] added cppcoreguidelines-explicit-virtual-functions

2019-02-27 Thread Lewis Clark via Phabricator via cfe-commits
lewmpk created this revision. lewmpk added reviewers: alexfh, alexfh_. Herald added subscribers: cfe-commits, kbarton, xazax.hun, nemanjai. Herald added a project: clang. Addresses the bugzilla bug #30397. modernize-use-override suggests that destructors require the override specifier and the CPP

[PATCH] D58666: [OpenCL] Undefine cl_intel_planar_yuv extension

2019-02-27 Thread Dmitry Sidorov via Phabricator via cfe-commits
sidorovd marked an inline comment as done. sidorovd added inline comments. Comment at: test/SemaOpenCL/extension-begin.cl:26 + #ifndef IMPLICIT_INCLUDE #include "extension-begin.h" Anastasia wrote: > sidorovd wrote: > > Anastasia wrote: > > > Can we also test t

[PATCH] D58418: [clang][DirectoryWatcher] Upstream DirectoryWatcher

2019-02-27 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. Maybe move it to LLVM? As this watcher may be useful for other projects in the future? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58418/new/ https://reviews.llvm.org/D58418 ___ cfe-commits mailing list cfe-comm

[PATCH] D58418: [clang][DirectoryWatcher] Upstream DirectoryWatcher

2019-02-27 Thread Jan Korous via Phabricator via cfe-commits
jkorous updated this revision to Diff 188586. jkorous added a comment. - moved checks for CoreServices/inotify to cmake CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58418/new/ https://reviews.llvm.org/D58418 Files: clang/include/clang/DirectoryWatcher/DirectoryWatcher.h clang/lib/

[PATCH] D56943: [clang-format][NFC] Allow getLLVMStyle() to take a language

2019-02-27 Thread Jordan Rupprecht via Phabricator via cfe-commits
rupprecht added inline comments. Comment at: clang/lib/Format/ContinuationIndenter.cpp:193 RawStringFormat.Language, &PredefinedStyle)) { -PredefinedStyle = getLLVMStyle(); +PredefinedStyle = getLLVMStyle(FormatStyle::LK_Cpp);

[PATCH] D56943: [clang-format][NFC] Allow getLLVMStyle() to take a language

2019-02-27 Thread Jordan Rupprecht via Phabricator via cfe-commits
rupprecht updated this revision to Diff 188584. rupprecht marked 2 inline comments as done. rupprecht added a comment. Revert getLLVMStyle(LK_Cpp) fixes Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56943/new/ https://reviews.llvm.org/D56943 Files

[PATCH] D52835: [Diagnostics] Check integer to floating point number implicit conversions

2019-02-27 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. @aaron.ballman does it make sense to warn for this case only in C mode? Since this case in C++ is handled by -Wnarrowing, as we see from tests. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D52835/new/ https://reviews.llvm.org/D52835

[PATCH] D58729: Emit boxed expression as a compile-time constant if the expression inside the parentheses is a string literal

2019-02-27 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak created this revision. ahatanak added reviewers: rjmccall, arphaman. ahatanak added a project: clang. Herald added subscribers: jdoerfert, dexonsmith, jkorous. clang currently emits an expression like `@("abc")` as a message send to `stringWithUTF8String`. This patch makes changes so tha

[PATCH] D57898: CodeGen: Fix PR40605

2019-02-27 Thread JF Bastien via Phabricator via cfe-commits
jfb added a comment. Can you change the title to be more descriptive? Small test fixes, otherwise this LGTM, will check box after update. Comment at: clang/test/CodeGenCXX/auto-var-init.cpp:123 +// PATTERN-NOT-O1: @__const.test_int1_custom.custom +// ZERO-NOT-O1: @__const.test

r355017 - Add triples to the test I committed in r355012 to fix windows bots.

2019-02-27 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Wed Feb 27 10:59:52 2019 New Revision: 355017 URL: http://llvm.org/viewvc/llvm-project?rev=355017&view=rev Log: Add triples to the test I committed in r355012 to fix windows bots. Modified: cfe/trunk/test/PCH/arc-blocks.mm Modified: cfe/trunk/test/PCH/arc-blocks.mm URL

[libclc] r355016 - Creating release candidate rc3 from release_800 branch

2019-02-27 Thread Hans Wennborg via cfe-commits
Author: hans Date: Wed Feb 27 10:49:24 2019 New Revision: 355016 URL: http://llvm.org/viewvc/llvm-project?rev=355016&view=rev Log: Creating release candidate rc3 from release_800 branch Added: libclc/tags/RELEASE_800/rc3/ - copied from r355015, libclc/branches/release_80/ _

[libunwind] r355016 - Creating release candidate rc3 from release_800 branch

2019-02-27 Thread Hans Wennborg via cfe-commits
Author: hans Date: Wed Feb 27 10:49:24 2019 New Revision: 355016 URL: http://llvm.org/viewvc/llvm-project?rev=355016&view=rev Log: Creating release candidate rc3 from release_800 branch Added: libunwind/tags/RELEASE_800/rc3/ - copied from r355015, libunwind/branches/release_80/ ___

[PATCH] D58236: Make address space conversions a bit stricter.

2019-02-27 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: test/SemaOpenCL/address-spaces.cl:87 + + // FIXME: This doesn't seem right. This should be an error, not a warning. + __local int * __global * __private * lll; Anastasia wrote: > ebevhan wrote: > > Anastasia wrote: >

[PATCH] D58236: Make address space conversions a bit stricter.

2019-02-27 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added a comment. Generally, with an explicit cast, C allows any pointer cast with a reasonable interpretation, even if the underlying operation is suspicious. For example, you can cast an "long*" to a "int*" (as in "(int*)(long*)p") without any complaint, even though dereferencing the

[PATCH] D58719: [PR40778][Sema] Adjust address space of operands in builtin operators

2019-02-27 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. I think the right model is that a builtin operator candidate exists for all possible address-space qualifiers on the pointer/reference pointee, and it should be straightforward to only actually add candidates for the qualifier used by the corresponding operand. CHANG

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

2019-02-27 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak closed this revision. ahatanak added a comment. Fixed in r355012. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58514/new/ https://reviews.llvm.org/D58514 ___ cfe-commits mailing list cfe-commits@lists.llvm.

[PATCH] D58346: [Sema] Change addr space diagnostics in casts to follow C++ style

2019-02-27 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia marked an inline comment as done. Anastasia added inline comments. Comment at: lib/Sema/SemaCast.cpp:2309 +auto DestPointeeTypeWithoutAS = Self.Context.removeAddrSpaceQualType( +DestPointeeType.getCanonicalType()); +return Self.Context.hasSameType(SrcPoi

r355012 - Avoid needlessly copying a block to the heap when a block literal

2019-02-27 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Wed Feb 27 10:17:16 2019 New Revision: 355012 URL: http://llvm.org/viewvc/llvm-project?rev=355012&view=rev Log: Avoid needlessly copying a block to the heap when a block literal initializes a local auto variable or is assigned to a local auto variable that is declared in the

[PATCH] D58346: [Sema] Change addr space diagnostics in casts to follow C++ style

2019-02-27 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia updated this revision to Diff 188577. Anastasia added a comment. - Added a comment to explain OpenCL check. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58346/new/ https://reviews.llvm.org/D58346 Files: include/clang/Basic/DiagnosticSemaKinds.td lib/Sema/SemaCast.cpp t

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

2019-02-27 Thread pierre gousseau via Phabricator via cfe-commits
pgousseau updated this revision to Diff 188576. pgousseau added a comment. move hash_value declaration to clang's namespace to solve lldb cmake bot build error. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57914/new/ https://reviews.llvm.org/D57914 Files: include/clang/Basic/Attr.t

[PATCH] D58708: [PR40778] Preserve addr space in Derived to Base cast

2019-02-27 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: lib/Sema/SemaExpr.cpp:2670 } else { DestType = DestRecordType; FromRecordType = FromType; This path (when the object is a gl-value) also needs an address-space qualifier, so you should probably add i

  1   2   >