Re: [PATCH] D12022: Refactored dtor sanitizing into EHScopeStack

2015-08-26 Thread Evgeniy Stepanov via cfe-commits
eugenis added a comment. Richard, would you mind taking a look a this change? http://reviews.llvm.org/D12022 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D11740: ABI versioning macros for libc++

2015-08-27 Thread Evgeniy Stepanov via cfe-commits
eugenis added a comment. Yes, not being able to use headers in the libcxx source tree is quite unpleasant. It can be fixed by providing a __config_version in libcxx/include with the default version values. Or, in the approach of http://reviews.llvm.org/D11963, do something smart in __config to

Re: [PATCH] D11740: ABI versioning macros for libc++

2015-08-27 Thread Evgeniy Stepanov via cfe-commits
eugenis added a comment. In http://reviews.llvm.org/D11740#234610, @EricWF wrote: > In http://reviews.llvm.org/D11740#234575, @eugenis wrote: > > > Yes, not being able to use headers in the libcxx source tree is quite > > unpleasant. It can be fixed by providing a __config_version in > > libcxx

Re: [PATCH] D11740: ABI versioning macros for libc++

2015-08-27 Thread Evgeniy Stepanov via cfe-commits
eugenis added a comment. There is a bit of a problem with testing libc++. If the library is built for the non-default ABI, we can not build tests against headers in libc++ source. And the headers in the build directory are only updated when cmake is re-run. I guess the latter can be fixed by up

Re: [PATCH] D11740: ABI versioning macros for libc++

2015-08-27 Thread Evgeniy Stepanov via cfe-commits
eugenis updated this revision to Diff 33381. eugenis added a comment. Remove minor version, added abi_unstable,. Keeping __config_version until the other change lands. Tests use headers from the build directory. http://reviews.llvm.org/D11740 Files: CMakeLists.txt docs/Abi.rst docs/Buildi

Re: [PATCH] D12022: Refactored dtor sanitizing into EHScopeStack

2015-09-01 Thread Evgeniy Stepanov via cfe-commits
eugenis added inline comments. Comment at: lib/CodeGen/CGCXX.cpp:42-44 @@ -33,1 +41,5 @@ bool CodeGenModule::TryEmitBaseDestructorAsAlias(const CXXDestructorDecl *D) { + // If sanitizing memory to check for use-after-dtor, do not emit as + // an alias, unless it has no fields o

Re: [PATCH] D12087: always_inline codegen rewrite

2015-09-01 Thread Evgeniy Stepanov via cfe-commits
eugenis set the repository for this revision to rL LLVM. eugenis updated this revision to Diff 33746. eugenis marked an inline comment as done. Repository: rL LLVM http://reviews.llvm.org/D12087 Files: lib/CodeGen/CGCXX.cpp lib/CodeGen/CGClass.cpp lib/CodeGen/CGOpenMPRuntime.cpp lib/Co

Re: [PATCH] D12087: always_inline codegen rewrite

2015-09-01 Thread Evgeniy Stepanov via cfe-commits
eugenis added inline comments. Comment at: lib/CodeGen/CodeGenModule.cpp:469-470 @@ +468,4 @@ + llvm::LLVMContext &Ctx = getModule().getContext(); + llvm::Function *StubFn = + llvm::Function::Create(FT, Fn->getLinkage(), Name, &getModule()); + assert(StubFn->getName() == N

Re: [PATCH] D11963: Create a __config_site file to capture configuration decisions.

2015-09-01 Thread Evgeniy Stepanov via cfe-commits
eugenis added a subscriber: eugenis. eugenis added a comment. This would greatly simplify the abi versioning change in http://reviews.llvm.org/D11740. Thanks for working on this! Comment at: include/CMakeLists.txt:24 @@ +23,3 @@ + -P ${LIBCXX_SOURCE_DIR}/cmake/Modules/CopyLibc

Re: [PATCH] D12087: always_inline codegen rewrite

2015-09-01 Thread Evgeniy Stepanov via cfe-commits
eugenis updated this revision to Diff 33766. Repository: rL LLVM http://reviews.llvm.org/D12087 Files: lib/CodeGen/CGCXX.cpp lib/CodeGen/CGClass.cpp lib/CodeGen/CGOpenMPRuntime.cpp lib/CodeGen/CodeGenModule.cpp lib/CodeGen/CodeGenModule.h lib/CodeGen/ItaniumCXXABI.cpp test/CodeGe

Re: [PATCH] D12087: always_inline codegen rewrite

2015-09-01 Thread Evgeniy Stepanov via cfe-commits
eugenis marked 2 inline comments as done. eugenis added a comment. Repository: rL LLVM http://reviews.llvm.org/D12087 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D12087: always_inline codegen rewrite

2015-09-02 Thread Evgeniy Stepanov via cfe-commits
eugenis updated this revision to Diff 33868. eugenis marked 6 inline comments as done. Repository: rL LLVM http://reviews.llvm.org/D12087 Files: lib/CodeGen/CGCXX.cpp lib/CodeGen/CGClass.cpp lib/CodeGen/CGOpenMPRuntime.cpp lib/CodeGen/CodeGenModule.cpp lib/CodeGen/CodeGenModule.h l

Re: [PATCH] D12022: Refactored dtor sanitizing into EHScopeStack

2015-09-02 Thread Evgeniy Stepanov via cfe-commits
eugenis added inline comments. Comment at: lib/CodeGen/CGCXX.cpp:45 @@ +44,3 @@ + // destructors. + if (getCodeGenOpts().SanitizeMemoryUseAfterDtor) +return true; This simply suppresses all dtor alias under UseAfterDtor, effectively disabling the second che

Re: [PATCH] D12022: Refactored dtor sanitizing into EHScopeStack

2015-09-02 Thread Evgeniy Stepanov via cfe-commits
eugenis added a comment. LGTM but please wait for Richard's answer Comment at: lib/CodeGen/CGClass.cpp:1551 @@ +1550,3 @@ + // Prevent the current stack frame from disappearing from the stack trace. + CGF.CurFn->addFnAttr("disable-tail-calls", "true"); + -

Re: [PATCH] D12616: Failing test highlighting no poisoning if dtor undeclared.

2015-09-03 Thread Evgeniy Stepanov via cfe-commits
eugenis added inline comments. Comment at: test/CodeGenCXX/sanitize-dtor-generated.cpp:5 @@ +4,3 @@ + +// TODO Success pending on resolution of issue 596 +// XFAIL: * Add the link to the issue. Comment at: test/CodeGenCXX/sanitize-dtor-generated.

Re: [PATCH] D12087: always_inline codegen rewrite

2015-09-03 Thread Evgeniy Stepanov via cfe-commits
eugenis updated this revision to Diff 33997. Repository: rL LLVM http://reviews.llvm.org/D12087 Files: lib/CodeGen/CGCXX.cpp lib/CodeGen/CGClass.cpp lib/CodeGen/CGOpenMPRuntime.cpp lib/CodeGen/CodeGenModule.cpp lib/CodeGen/CodeGenModule.h lib/CodeGen/ItaniumCXXABI.cpp test/CodeGe

Re: [PATCH] D12087: always_inline codegen rewrite

2015-09-03 Thread Evgeniy Stepanov via cfe-commits
eugenis added a comment. In http://reviews.llvm.org/D12087#239243, @yaron.keren wrote: > In CGCXX.cpp, may be fixable after this commit: > > // FIXME: An extern template instantiation will create functions with > // linkage "AvailableExternally". In libc++, some classes also define > // mem

Re: [PATCH] D12616: Failing test highlighting no poisoning if dtor undeclared.

2015-09-04 Thread Evgeniy Stepanov via cfe-commits
eugenis accepted this revision. eugenis added a comment. This revision is now accepted and ready to land. I'd call the test sanitize-dtor-trivial.cpp http://reviews.llvm.org/D12616 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists

Re: [PATCH] D12087: always_inline codegen rewrite

2015-09-04 Thread Evgeniy Stepanov via cfe-commits
eugenis updated this revision to Diff 34095. Repository: rL LLVM http://reviews.llvm.org/D12087 Files: lib/CodeGen/CGCXX.cpp lib/CodeGen/CGClass.cpp lib/CodeGen/CGOpenMPRuntime.cpp lib/CodeGen/CodeGenModule.cpp lib/CodeGen/CodeGenModule.h lib/CodeGen/ItaniumCXXABI.cpp test/CodeGe

Re: [PATCH] D12087: always_inline codegen rewrite

2015-09-04 Thread Evgeniy Stepanov via cfe-commits
eugenis added inline comments. Comment at: lib/CodeGen/CodeGenModule.h:505 @@ +504,3 @@ + + llvm::SmallVector AlwaysInlineFunctions; + Right. Sorry I missed the comment. I've switched this to a vector. Repository: rL LLVM http://reviews.llvm.org/D12087 __

[PATCH] D13572: Use Triple.isAndroid() where possible.

2015-10-08 Thread Evgeniy Stepanov via cfe-commits
eugenis created this revision. eugenis added a reviewer: echristo. eugenis added a subscriber: cfe-commits. eugenis set the repository for this revision to rL LLVM. Herald added subscribers: srhines, danalbert, tberghammer. Depends on http://reviews.llvm.org/D13571 Repository: rL LLVM http://r

r249751 - Use Triple.isAndroid() where possible.

2015-10-08 Thread Evgeniy Stepanov via cfe-commits
Author: eugenis Date: Thu Oct 8 16:21:44 2015 New Revision: 249751 URL: http://llvm.org/viewvc/llvm-project?rev=249751&view=rev Log: Use Triple.isAndroid() where possible. Modified: cfe/trunk/lib/Basic/Targets.cpp cfe/trunk/lib/Driver/SanitizerArgs.cpp cfe/trunk/lib/Driver/ToolChain.

Re: [PATCH] D13572: Use Triple.isAndroid() where possible.

2015-10-08 Thread Evgeniy Stepanov via cfe-commits
eugenis closed this revision. eugenis added a comment. r249751 Repository: rL LLVM http://reviews.llvm.org/D13572 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D13407: [libcxx] Capture configuration information when installing the libc++ headers

2015-10-09 Thread Evgeniy Stepanov via cfe-commits
eugenis added a comment. Thanks. I'll upload the rebase patch on Monday. Comment at: include/CMakeLists.txt:38 @@ +37,3 @@ + COMMAND ${UNIX_CAT} ${LIBCXX_SOURCE_DIR}/include/__config >> ${LIBCXX_BINARY_DIR}/__generated_config + DEPENDS ${LIBCXX_SOURCE_DIR}/include/__c

Re: [PATCH] D11740: ABI versioning macros for libc++

2015-10-09 Thread Evgeniy Stepanov via cfe-commits
eugenis set the repository for this revision to rL LLVM. eugenis updated this revision to Diff 37015. eugenis added a comment. Rebased on http://reviews.llvm.org/D13407 Repository: rL LLVM http://reviews.llvm.org/D11740 Files: CMakeLists.txt cmake/Modules/HandleLibcxxFlags.cmake docs/A

r250128 - [safestack] Driver link test for safestack on android.

2015-10-12 Thread Evgeniy Stepanov via cfe-commits
Author: eugenis Date: Mon Oct 12 18:50:19 2015 New Revision: 250128 URL: http://llvm.org/viewvc/llvm-project?rev=250128&view=rev Log: [safestack] Driver link test for safestack on android. Safestack runtime should never be linked on Android targets because it is implemented directly in libc. This

[PATCH] D13705: [libcxxabi] Set correct libc++ version in tests.

2015-10-13 Thread Evgeniy Stepanov via cfe-commits
eugenis created this revision. eugenis added reviewers: mclow.lists, EricWF. eugenis added a subscriber: cfe-commits. eugenis set the repository for this revision to rL LLVM. Libcxxabi tests are built against non-installed libc++ headers, and they need to know the ABI version libc++ is configured

Re: [PATCH] D11740: ABI versioning macros for libc++

2015-10-13 Thread Evgeniy Stepanov via cfe-commits
eugenis added inline comments. Comment at: include/__config:252 @@ -246,1 +251,3 @@ +defined(_LIBCPP_ALTERNATE_STRING_LAYOUT) +#define _LIBCPP_ABI_ALTERNATE_STRING_LAYOUT #endif EricWF wrote: > I think he's demonstrating the patches functionality and intended

Re: [PATCH] D11740: ABI versioning macros for libc++

2015-10-13 Thread Evgeniy Stepanov via cfe-commits
eugenis updated this revision to Diff 37293. eugenis marked an inline comment as done. Repository: rL LLVM http://reviews.llvm.org/D11740 Files: CMakeLists.txt cmake/Modules/HandleLibcxxFlags.cmake docs/Abi.rst docs/BuildingLibcxx.rst include/__config include/__config_site.in inc

Re: [PATCH] D11740: ABI versioning macros for libc++

2015-10-13 Thread Evgeniy Stepanov via cfe-commits
eugenis added inline comments. Comment at: test/libcxx/test/config.py:444 @@ -442,1 +443,3 @@ +def configure_compile_flags_abi_version(self): +abi_version = self.get_lit_conf('abi_version', '').strip() EricWF wrote: > Please allow abi_version to be o

Re: [PATCH] D11740: ABI versioning macros for libc++

2015-10-13 Thread Evgeniy Stepanov via cfe-commits
eugenis updated this revision to Diff 37299. Repository: rL LLVM http://reviews.llvm.org/D11740 Files: CMakeLists.txt cmake/Modules/HandleLibcxxFlags.cmake docs/Abi.rst docs/BuildingLibcxx.rst include/__config include/__config_site.in include/string lib/CMakeLists.txt test/CM

[libcxx] r250254 - ABI versioning macros for libc++.

2015-10-13 Thread Evgeniy Stepanov via cfe-commits
Author: eugenis Date: Tue Oct 13 18:48:28 2015 New Revision: 250254 URL: http://llvm.org/viewvc/llvm-project?rev=250254&view=rev Log: ABI versioning macros for libc++. C++ macros and CMake options that specify the default ABI version of the library, and can be overridden to pick up new ABI-changi

Re: [PATCH] D11740: ABI versioning macros for libc++

2015-10-13 Thread Evgeniy Stepanov via cfe-commits
eugenis closed this revision. eugenis added a comment. Landed as r250254, thanks for the review! Repository: rL LLVM http://reviews.llvm.org/D11740 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/list

[PATCH] D13713: [libc++] Stop marking interface symbols always_inline + hidden when building for unstable ABI

2015-10-13 Thread Evgeniy Stepanov via cfe-commits
eugenis created this revision. eugenis added reviewers: mclow.lists, EricWF. eugenis added a subscriber: cfe-commits. eugenis set the repository for this revision to rL LLVM. Herald added a subscriber: aemerson. ABI stability is not an issue when building for unstable ABI. Other than that, always_

Re: [PATCH] D10677: Allow deque to handle incomplete types

2015-10-13 Thread Evgeniy Stepanov via cfe-commits
eugenis set the repository for this revision to rL LLVM. eugenis updated this revision to Diff 37310. eugenis added a comment. Using new ABI version macros to enable this feature in unstable or future ABI only. PTAL. Repository: rL LLVM http://reviews.llvm.org/D10677 Files: include/__conf

Re: [PATCH] D13713: [libc++] Stop marking interface symbols always_inline + hidden when building for unstable ABI

2015-10-14 Thread Evgeniy Stepanov via cfe-commits
eugenis updated this revision to Diff 37427. Repository: rL LLVM http://reviews.llvm.org/D13713 Files: docs/DesignDocs/ABIVersioning.rst include/__config Index: include/__config === --- include/__config +++ include/__config @

Re: [PATCH] D13713: [libc++] Stop marking interface symbols always_inline + hidden when building for unstable ABI

2015-10-14 Thread Evgeniy Stepanov via cfe-commits
eugenis added a comment. I've wrote down my understanding of the problem in ABIVersioning.rst. AFAIK, Howard added the attribute so he might know more about it. Why does windows need this attributes in the unstable abi build? Hidden visibility and always_inline work together for the same goal, s

Re: [PATCH] D10677: Allow deque to handle incomplete types

2015-10-19 Thread Evgeniy Stepanov via cfe-commits
eugenis updated this revision to Diff 37795. eugenis marked 3 inline comments as done. Repository: rL LLVM http://reviews.llvm.org/D10677 Files: include/__config include/deque test/libcxx/containers/sequences/deque/incomplete.pass.cpp Index: test/libcxx/containers/sequences/deque/incomp

Re: [PATCH] D10677: Allow deque to handle incomplete types

2015-10-19 Thread Evgeniy Stepanov via cfe-commits
eugenis added a comment. In http://reviews.llvm.org/D10677#266595, @EricWF wrote: > For the most part this looks good. I'm a touch concerned though about the > changes to the static initialization. The initializer is moved from within > the function body to outside it. Could you have somebody c

[PATCH] D13925: Implement __attribute__((internal_linkage))

2015-10-20 Thread Evgeniy Stepanov via cfe-commits
eugenis created this revision. eugenis added a reviewer: rsmith. eugenis added subscribers: cfe-commits, EricWF, rnk. eugenis set the repository for this revision to rL LLVM. The attrubite is applicable to functions and variables and changes the linkage of the subject to internal. Following the

Re: [PATCH] D13925: Implement __attribute__((internal_linkage))

2015-10-20 Thread Evgeniy Stepanov via cfe-commits
eugenis added inline comments. Comment at: lib/Sema/SemaDeclAttr.cpp:1580-1585 @@ -1577,3 +1579,8 @@ + + if (InternalLinkageAttr *Internal = D->getAttr()) { +S.Diag(Attr.getRange().getBegin(), diag::warn_attribute_ignored) +<< Attr.getName(); +S.Diag(Internal->get

r250941 - MemorySanitizer does not require PIE.

2015-10-21 Thread Evgeniy Stepanov via cfe-commits
Author: eugenis Date: Wed Oct 21 15:20:03 2015 New Revision: 250941 URL: http://llvm.org/viewvc/llvm-project?rev=250941&view=rev Log: MemorySanitizer does not require PIE. Since r249754 MemorySanitizer should work equally well for PIE and non-PIE executables. Beware, with this change -fsanitize=

r250944 - Revert "MemorySanitizer does not require PIE."

2015-10-21 Thread Evgeniy Stepanov via cfe-commits
Author: eugenis Date: Wed Oct 21 15:47:00 2015 New Revision: 250944 URL: http://llvm.org/viewvc/llvm-project?rev=250944&view=rev Log: Revert "MemorySanitizer does not require PIE." It actually does require PIE on some targets. Modified: cfe/trunk/lib/Driver/SanitizerArgs.cpp cfe/trunk/te

r250949 - MemorySanitizer does not require PIE.

2015-10-21 Thread Evgeniy Stepanov via cfe-commits
Author: eugenis Date: Wed Oct 21 16:28:49 2015 New Revision: 250949 URL: http://llvm.org/viewvc/llvm-project?rev=250949&view=rev Log: MemorySanitizer does not require PIE. Since r249754 MemorySanitizer should work equally well for PIE and non-PIE executables on Linux/x86_64. Beware, with this ch

Re: [PATCH] D10677: Allow deque to handle incomplete types

2015-10-21 Thread Evgeniy Stepanov via cfe-commits
eugenis added a comment. What kind of confirmation are you looking for? I've compiled the following code with 2 versions of : one as in this review, another the same but with __block_size initializers moved back into respective classes. Resulting object files are identical. #include int main

Re: [PATCH] D13925: Implement __attribute__((internal_linkage))

2015-10-21 Thread Evgeniy Stepanov via cfe-commits
eugenis updated this revision to Diff 38071. eugenis marked 2 inline comments as done. eugenis added a comment. This new version supports __attribute__((internal_linkage)) on classes and even namespaces! Repository: rL LLVM http://reviews.llvm.org/D13925 Files: include/clang/Basic/Attr.td

Re: [PATCH] D13925: Implement __attribute__((internal_linkage))

2015-10-21 Thread Evgeniy Stepanov via cfe-commits
eugenis added inline comments. Comment at: lib/Sema/SemaDeclAttr.cpp:1580-1585 @@ -1577,3 +1579,8 @@ + + if (InternalLinkageAttr *Internal = D->getAttr()) { +S.Diag(Attr.getRange().getBegin(), diag::warn_attribute_ignored) +<< Attr.getName(); +S.Diag(Internal->get

Re: [PATCH] D12382: Extend linux header search to find libc++ headers in c++/vN for any N.

2015-10-26 Thread Evgeniy Stepanov via cfe-commits
eugenis added a comment. ping We will need this when libc++ is bumped to v2. There are no plans to do this AFAIK but the ABI version macros are in so it is possible and clang should be ready. http://reviews.llvm.org/D12382 ___ cfe-commits mailing

Re: [PATCH] D13925: Implement __attribute__((internal_linkage))

2015-10-28 Thread Evgeniy Stepanov via cfe-commits
eugenis updated this revision to Diff 38679. Repository: rL LLVM http://reviews.llvm.org/D13925 Files: include/clang/Basic/Attr.td include/clang/Basic/AttrDocs.td include/clang/Sema/Sema.h lib/AST/Decl.cpp lib/Sema/Sema.cpp lib/Sema/SemaDecl.cpp lib/Sema/SemaDeclAttr.cpp test/C

Re: [PATCH] D13925: Implement __attribute__((internal_linkage))

2015-10-28 Thread Evgeniy Stepanov via cfe-commits
eugenis added a comment. In http://reviews.llvm.org/D13925#276626, @majnemer wrote: > No diagnostic is issued for the following C test case: > > int x __attribute__((internal_linkage)); > int x __attribute__((common)); > int *f() { return &x; } Thanks for noticing! Added missing attribute

Re: [PATCH] D13925: Implement __attribute__((internal_linkage))

2015-11-02 Thread Evgeniy Stepanov via cfe-commits
eugenis updated this revision to Diff 38979. eugenis added a comment. Added a [[clang::internal_linkage]] spelling to the attribute. Added tests for namespace re-declarations with and without the attribute. Repository: rL LLVM http://reviews.llvm.org/D13925 Files: include/clang/Basic/Attr.

Re: [PATCH] D13925: Implement __attribute__((internal_linkage))

2015-11-03 Thread Evgeniy Stepanov via cfe-commits
eugenis added inline comments. Comment at: include/clang/Basic/Attr.td:2125 @@ +2124,3 @@ + +def InternalLinkage : InheritableAttr { + let Spellings = [GNU<"internal_linkage">, CXX11<"clang", "internal_linkage">]; aaron.ballman wrote: > rsmith wrote: > > `Inheri

Re: [PATCH] D13925: Implement __attribute__((internal_linkage))

2015-11-03 Thread Evgeniy Stepanov via cfe-commits
eugenis updated this revision to Diff 39124. eugenis marked 5 inline comments as done. eugenis added a comment. Disabled the new attribute on namespaces. Repository: rL LLVM http://reviews.llvm.org/D13925 Files: include/clang/Basic/Attr.td include/clang/Basic/AttrDocs.td include/clang/

Re: [PATCH] D13925: Implement __attribute__((internal_linkage))

2015-11-03 Thread Evgeniy Stepanov via cfe-commits
eugenis updated this revision to Diff 39128. eugenis added a comment. One more test for forward declarations. Repository: rL LLVM http://reviews.llvm.org/D13925 Files: include/clang/Basic/Attr.td include/clang/Basic/AttrDocs.td include/clang/Sema/Sema.h lib/AST/Decl.cpp lib/Sema/Se

Re: [PATCH] D13925: Implement __attribute__((internal_linkage))

2015-11-03 Thread Evgeniy Stepanov via cfe-commits
eugenis updated this revision to Diff 39135. eugenis marked 2 inline comments as done. Repository: rL LLVM http://reviews.llvm.org/D13925 Files: include/clang/Basic/Attr.td include/clang/Basic/AttrDocs.td include/clang/Sema/Sema.h lib/AST/Decl.cpp lib/Sema/SemaDecl.cpp lib/Sema/Sem

Re: [PATCH] D13925: Implement __attribute__((internal_linkage))

2015-11-03 Thread Evgeniy Stepanov via cfe-commits
eugenis added inline comments. Comment at: lib/AST/Decl.cpp:635-641 @@ -634,2 +634,9 @@ assert(!isa(D) && "Didn't expect a FieldDecl!"); + for (const DeclContext *DC = D->getDeclContext(); + !isa(DC); DC = DC->getParent()) { +const NamespaceDecl *ND = dyn_cast(DC);

Re: [PATCH] D10677: Allow deque to handle incomplete types

2015-11-04 Thread Evgeniy Stepanov via cfe-commits
eugenis added a comment. Hi Eric, could you please clarify what exactly you are looking for here? Repository: rL LLVM http://reviews.llvm.org/D10677 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/li

Re: [PATCH] D13925: Implement __attribute__((internal_linkage))

2015-11-04 Thread Evgeniy Stepanov via cfe-commits
eugenis added a comment. Hm, the current implementation allows all of the following: void f(int a [[clang::internal_linkage]]) { // 1 int b [[clang::internal_linkage]]; // 2 static int c [[clang::internal_linkage]]; // 3 } I'll fix (1). Is it OK to allow (2) and (3)? The attribute has

Re: [PATCH] D13925: Implement __attribute__((internal_linkage))

2015-11-04 Thread Evgeniy Stepanov via cfe-commits
eugenis added a comment. How do I check if a Var is a local variable? Comment at: test/CodeGenCXX/attribute_internal_linkage.cpp:35-36 @@ +34,4 @@ +__attribute__((internal_linkage)) void A::f3() { +} + +// Forward declaration w/o an attribute. OK, done. Still al

Re: [PATCH] D13925: Implement __attribute__((internal_linkage))

2015-11-04 Thread Evgeniy Stepanov via cfe-commits
eugenis updated this revision to Diff 39245. Repository: rL LLVM http://reviews.llvm.org/D13925 Files: include/clang/Basic/Attr.td include/clang/Basic/AttrDocs.td include/clang/Basic/DiagnosticSemaKinds.td include/clang/Sema/Sema.h lib/AST/Decl.cpp lib/Sema/SemaDecl.cpp lib/Sema/

Re: [PATCH] D13925: Implement __attribute__((internal_linkage))

2015-11-04 Thread Evgeniy Stepanov via cfe-commits
eugenis updated this revision to Diff 39249. Repository: rL LLVM http://reviews.llvm.org/D13925 Files: include/clang/Basic/Attr.td include/clang/Basic/AttrDocs.td include/clang/Basic/DiagnosticSemaKinds.td include/clang/Sema/Sema.h lib/AST/Decl.cpp lib/Sema/SemaDecl.cpp lib/Sema/

Re: [PATCH] D13925: Implement __attribute__((internal_linkage))

2015-11-04 Thread Evgeniy Stepanov via cfe-commits
eugenis added a comment. In http://reviews.llvm.org/D13925#281349, @eugenis wrote: > Hm, the current implementation allows all of the following: > > void f(int a [[clang::internal_linkage]]) { // 1 > > int b [[clang::internal_linkage]]; // 2 > static int c [[clang::internal_linkage]]; //

Re: [PATCH] D13925: Implement __attribute__((internal_linkage))

2015-11-04 Thread Evgeniy Stepanov via cfe-commits
eugenis added inline comments. Comment at: test/SemaCXX/internal_linkage.cpp:23 @@ +22,3 @@ + +__attribute__((internal_linkage)) void A::f4() {} // expected-error{{'internal_linkage' attribute does not appear on the first declaration of 'f4'}} + Btw, this trigge

Re: [PATCH] D13925: Implement __attribute__((internal_linkage))

2015-11-05 Thread Evgeniy Stepanov via cfe-commits
eugenis updated this revision to Diff 39389. eugenis marked an inline comment as done. eugenis added a comment. Added the new warning to a -W group. Repository: rL LLVM http://reviews.llvm.org/D13925 Files: include/clang/Basic/Attr.td include/clang/Basic/AttrDocs.td include/clang/Basic

Re: [PATCH] D13925: Implement __attribute__((internal_linkage))

2015-11-05 Thread Evgeniy Stepanov via cfe-commits
eugenis added inline comments. Comment at: lib/Sema/SemaDeclAttr.cpp:3407 @@ +3406,3 @@ + : ExpectedVariableOrFunction); +D->dropAttr(); + } aaron.ballman wrote: > Why is this dropping AlwaysInlineAttr instead of re

[PATCH] D14409: Remove visibility attributes from out-of-class method definitions in iostreams.

2015-11-05 Thread Evgeniy Stepanov via cfe-commits
eugenis created this revision. eugenis added reviewers: mclow.lists, EricWF. eugenis added a subscriber: cfe-commits. eugenis set the repository for this revision to rL LLVM. No point in pretending that these methods are hidden - they are actually exported from libc++.so. Extern template declarati

[PATCH] D14410: Cleanup: move all visibility attributes to the first declaration.

2015-11-05 Thread Evgeniy Stepanov via cfe-commits
eugenis created this revision. eugenis added reviewers: EricWF, mclow.lists. eugenis added a subscriber: cfe-commits. eugenis set the repository for this revision to rL LLVM. This change moves visibility attributes from out-of-class method definitions to in-class declaration. This is needed for a

[PATCH] D14411: Use __attribute__((internal_linkage)) when available.

2015-11-05 Thread Evgeniy Stepanov via cfe-commits
eugenis created this revision. eugenis added reviewers: EricWF, mclow.lists. eugenis added a subscriber: cfe-commits. eugenis set the repository for this revision to rL LLVM. Use __attribute__((internal_linkage)) instead of always_inline and visibility("hidden") when it is available. Repository:

Re: [PATCH] D12382: Extend linux header search to find libc++ headers in c++/vN for any N.

2015-11-06 Thread Evgeniy Stepanov via cfe-commits
eugenis marked an inline comment as done. eugenis added a comment. Repository: rL LLVM http://reviews.llvm.org/D12382 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D12382: Extend linux header search to find libc++ headers in c++/vN for any N.

2015-11-06 Thread Evgeniy Stepanov via cfe-commits
eugenis set the repository for this revision to rL LLVM. eugenis updated this revision to Diff 39587. Repository: rL LLVM http://reviews.llvm.org/D12382 Files: lib/Driver/ToolChains.cpp test/Driver/Inputs/basic_linux_libcxxv2_tree/usr/bin/.keep test/Driver/Inputs/basic_linux_libcxxv2_tre

Re: [PATCH] D14410: Cleanup: move all visibility attributes to the first declaration.

2015-11-06 Thread Evgeniy Stepanov via cfe-commits
eugenis added a comment. This is a mechanical change, and AFAIR I checked that no bits of libc++.so are affected. The same mechanical change in streambuf/istream/ostream (the stuff that's parts of extern templates) breaks libc++ because of https://llvm.org/bugs/show_bug.cgi?id=25427, that's wh

Re: [PATCH] D10677: Allow deque to handle incomplete types

2015-11-06 Thread Evgeniy Stepanov via cfe-commits
eugenis closed this revision. eugenis added a comment. Thanks! Landed as r252350. Repository: rL LLVM http://reviews.llvm.org/D10677 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commit

[libcxx] r252350 - Allow deque to handle incomplete types.

2015-11-06 Thread Evgeniy Stepanov via cfe-commits
Author: eugenis Date: Fri Nov 6 16:02:29 2015 New Revision: 252350 URL: http://llvm.org/viewvc/llvm-project?rev=252350&view=rev Log: Allow deque to handle incomplete types. Allow deque and deque::iterator instantiation with incomplete element type. This is an ABI breaking change, and it is only

Re: [PATCH] D14410: Cleanup: move all visibility attributes to the first declaration.

2015-11-06 Thread Evgeniy Stepanov via cfe-commits
eugenis added a comment. Yes. I'm just using libc++.so as a (incomplete) test that this is actually NFC. It did catch the extern template issue. Repository: rL LLVM http://reviews.llvm.org/D14410 ___ cfe-commits mailing list cfe-commits@lists.ll

[libcxx] r252385 - Cleanup: move visibility/linkage attributes to the first declaration.

2015-11-06 Thread Evgeniy Stepanov via cfe-commits
Author: eugenis Date: Fri Nov 6 19:22:13 2015 New Revision: 252385 URL: http://llvm.org/viewvc/llvm-project?rev=252385&view=rev Log: Cleanup: move visibility/linkage attributes to the first declaration. This change moves visibility attributes from out-of-class method definitions to in-class decl

Re: [PATCH] D14410: Cleanup: move all visibility attributes to the first declaration.

2015-11-06 Thread Evgeniy Stepanov via cfe-commits
eugenis closed this revision. eugenis added a comment. Confirmed and landed as r252385. Thanks for the quick response! Repository: rL LLVM http://reviews.llvm.org/D14410 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.or

Re: [PATCH] D13925: Implement __attribute__((internal_linkage))

2015-11-09 Thread Evgeniy Stepanov via cfe-commits
eugenis added a comment. Richard, are you OK with this? Repository: rL LLVM http://reviews.llvm.org/D13925 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

r252514 - Extend linux header search to find libc++ headers in c++/vN for any N.

2015-11-09 Thread Evgeniy Stepanov via cfe-commits
Author: eugenis Date: Mon Nov 9 15:10:54 2015 New Revision: 252514 URL: http://llvm.org/viewvc/llvm-project?rev=252514&view=rev Log: Extend linux header search to find libc++ headers in c++/vN for any N. Added: cfe/trunk/test/Driver/Inputs/basic_linux_libcxxv2_tree/ cfe/trunk/test/Driver

Re: [PATCH] D12382: Extend linux header search to find libc++ headers in c++/vN for any N.

2015-11-09 Thread Evgeniy Stepanov via cfe-commits
eugenis closed this revision. eugenis added a comment. r252514 Repository: rL LLVM http://reviews.llvm.org/D12382 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D14409: Remove visibility attributes from out-of-class method definitions in iostreams.

2015-11-09 Thread Evgeniy Stepanov via cfe-commits
eugenis updated this revision to Diff 39750. eugenis added a comment. Applied the same change to . No idea how I missed it. Repository: rL LLVM http://reviews.llvm.org/D14409 Files: include/istream include/ostream include/sstream include/streambuf Index: include/streambuf ==

Re: [PATCH] D13925: Implement __attribute__((internal_linkage))

2015-11-09 Thread Evgeniy Stepanov via cfe-commits
eugenis updated this revision to Diff 39751. eugenis added a comment. Rebase. Repository: rL LLVM http://reviews.llvm.org/D13925 Files: include/clang/Basic/Attr.td include/clang/Basic/AttrDocs.td include/clang/Basic/DiagnosticSemaKinds.td include/clang/Sema/Sema.h lib/AST/Decl.cpp

Re: [PATCH] D14409: Remove visibility attributes from out-of-class method definitions in iostreams.

2015-11-09 Thread Evgeniy Stepanov via cfe-commits
eugenis added a comment. is an interesting case. There are no cases of visibility attribute present on an out-of-class definition but missing on an in-class declaration, so nothing needs to be done for a switch to internal_linkage. Setting hidden visibility on an "extern template" method is pr

Re: [PATCH] D13925: Implement __attribute__((internal_linkage))

2015-11-10 Thread Evgeniy Stepanov via cfe-commits
eugenis closed this revision. eugenis added a comment. r252648. Thanks everyone for the very detailed review! Repository: rL LLVM http://reviews.llvm.org/D13925 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin

r252648 - Implement __attribute__((internal_linkage)).

2015-11-10 Thread Evgeniy Stepanov via cfe-commits
Author: eugenis Date: Tue Nov 10 15:28:44 2015 New Revision: 252648 URL: http://llvm.org/viewvc/llvm-project?rev=252648&view=rev Log: Implement __attribute__((internal_linkage)). The attrubite is applicable to functions and variables and changes the linkage of the subject to internal. This is th

Re: [PATCH] D16738: Fix invalid casts in .

2016-02-01 Thread Evgeniy Stepanov via cfe-commits
eugenis added a comment. In http://reviews.llvm.org/D16738#340175, @EricWF wrote: > > This also could be fixed in a different way by replacing C-style > > > casts with reinterpret_cast<>, which, from my reading of the > > > standard, is allowed in this context. > > > I agree that using `void*`

[PATCH] D16823: [cfi] Safe handling of unaddressable vtable pointers (clang).

2016-02-02 Thread Evgeniy Stepanov via cfe-commits
eugenis created this revision. eugenis added reviewers: pcc, kcc. eugenis added a subscriber: cfe-commits. eugenis set the repository for this revision to rL LLVM. Avoid crashing when printing diagnostics for vtable-related CFI errors. In diagnostic mode, the frontend does an additional check of t

Re: [PATCH] D16823: [cfi] Safe handling of unaddressable vtable pointers (clang).

2016-02-02 Thread Evgeniy Stepanov via cfe-commits
eugenis added inline comments. Comment at: lib/CodeGen/CGExpr.cpp:2494 @@ +2493,3 @@ + llvm::Value *ValidVtable = nullptr; + if (CheckAndAppendValidVtable) { +llvm::Value *AllVtables = llvm::MetadataAsValue::get( samsonov wrote: > This is really ugly. Why ar

Re: [PATCH] D16823: [cfi] Safe handling of unaddressable vtable pointers (clang).

2016-02-02 Thread Evgeniy Stepanov via cfe-commits
eugenis added inline comments. Comment at: lib/CodeGen/CGExpr.cpp:2494 @@ +2493,3 @@ + llvm::Value *ValidVtable = nullptr; + if (CheckAndAppendValidVtable) { +llvm::Value *AllVtables = llvm::MetadataAsValue::get( pcc wrote: > eugenis wrote: > > samsonov wrot

Re: [PATCH] D16823: [cfi] Safe handling of unaddressable vtable pointers (clang).

2016-02-02 Thread Evgeniy Stepanov via cfe-commits
eugenis updated this revision to Diff 46718. eugenis added a comment. Moved bitset.text call outside. LLVM is smart enough to sink it along the cold branch, so performance should not suffer. Repository: rL LLVM http://reviews.llvm.org/D16823 Files: lib/CodeGen/CGClass.cpp lib/CodeGen/CG

Re: [PATCH] D16823: [cfi] Safe handling of unaddressable vtable pointers (clang).

2016-02-02 Thread Evgeniy Stepanov via cfe-commits
eugenis updated this revision to Diff 46723. eugenis marked an inline comment as done. Repository: rL LLVM http://reviews.llvm.org/D16823 Files: lib/CodeGen/CGClass.cpp lib/CodeGen/CGExpr.cpp lib/CodeGen/CodeGenModule.cpp lib/CodeGen/CodeGenModule.h test/CodeGen/cfi-check-fail.c te

Re: [PATCH] D16823: [cfi] Safe handling of unaddressable vtable pointers (clang).

2016-02-02 Thread Evgeniy Stepanov via cfe-commits
eugenis added inline comments. Comment at: lib/CodeGen/CodeGenModule.cpp:4053 @@ +4052,3 @@ + + if (!CodeGenOpts.SanitizeTrap.has(SanitizerKind::CFIVCall) || + !CodeGenOpts.SanitizeTrap.has(SanitizerKind::CFINVCall) || I don't like emitting all these bitset

Re: [PATCH] D16823: [cfi] Safe handling of unaddressable vtable pointers (clang).

2016-02-02 Thread Evgeniy Stepanov via cfe-commits
eugenis added inline comments. Comment at: lib/CodeGen/CGExpr.cpp:2642 @@ +2641,3 @@ + llvm::MDString::get(CGM.getLLVMContext(), "all-vtables")); + llvm::Value *ValidVtable = Builder.CreateZExt( + Builder.CreateCall(CGM.getIntrinsic(llvm::Intrinsic::bitset_test), --

Re: [PATCH] D16823: [cfi] Safe handling of unaddressable vtable pointers (clang).

2016-02-03 Thread Evgeniy Stepanov via cfe-commits
eugenis added inline comments. Comment at: lib/CodeGen/CGClass.cpp:2608 @@ -2607,3 +2607,3 @@ auto TypeId = CGM.CreateCfiIdForTypeMetadata(MD); if (CGM.getCodeGenOpts().SanitizeCfiCrossDso && TypeId) { EmitCfiSlowPathCheck(M, BitSetTest, TypeId, CastedVTable, StaticData

Re: [PATCH] D16823: [cfi] Safe handling of unaddressable vtable pointers (clang).

2016-02-03 Thread Evgeniy Stepanov via cfe-commits
eugenis updated this revision to Diff 46807. Repository: rL LLVM http://reviews.llvm.org/D16823 Files: lib/CodeGen/CGClass.cpp lib/CodeGen/CGExpr.cpp lib/CodeGen/CodeGenModule.cpp lib/CodeGen/CodeGenModule.h test/CodeGen/cfi-check-fail.c test/CodeGenCXX/cfi-cast.cpp test/CodeGenC

r259716 - [cfi] Safe handling of unaddressable vtable pointers (clang).

2016-02-03 Thread Evgeniy Stepanov via cfe-commits
Author: eugenis Date: Wed Feb 3 16:18:55 2016 New Revision: 259716 URL: http://llvm.org/viewvc/llvm-project?rev=259716&view=rev Log: [cfi] Safe handling of unaddressable vtable pointers (clang). Avoid crashing when printing diagnostics for vtable-related CFI errors. In diagnostic mode, the front

Re: [PATCH] D16823: [cfi] Safe handling of unaddressable vtable pointers (clang).

2016-02-03 Thread Evgeniy Stepanov via cfe-commits
eugenis closed this revision. eugenis added a comment. http://llvm.org/viewvc/llvm-project?rev=259716&view=rev Repository: rL LLVM http://reviews.llvm.org/D16823 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bi

Re: [PATCH] D16738: Fix invalid casts in .

2016-02-03 Thread Evgeniy Stepanov via cfe-commits
eugenis updated this revision to Diff 46857. eugenis added a comment. How about this? Repository: rL LLVM http://reviews.llvm.org/D16738 Files: include/__config include/functional Index: include/functional === --- include/f

Re: [PATCH] D16738: Fix invalid casts in .

2016-02-08 Thread Evgeniy Stepanov via cfe-commits
eugenis added a comment. In http://reviews.llvm.org/D16738#345696, @EricWF wrote: > I prefer using the `(void*)` casts when possible. In particular when doing > the pointer comparisons. Could you change those back to `void*` casts then > use the `__as_base` function for the rest? done Repos

Re: [PATCH] D16738: Fix invalid casts in .

2016-02-08 Thread Evgeniy Stepanov via cfe-commits
eugenis updated this revision to Diff 47271. Repository: rL LLVM http://reviews.llvm.org/D16738 Files: include/__config include/functional Index: include/functional === --- include/functional +++ include/functional @@ -1564,6

[libcxx] r260441 - Fix invalid casts in .

2016-02-10 Thread Evgeniy Stepanov via cfe-commits
Author: eugenis Date: Wed Feb 10 15:53:28 2016 New Revision: 260441 URL: http://llvm.org/viewvc/llvm-project?rev=260441&view=rev Log: Fix invalid casts in . static_cast of a pointer to object before the start of the object's lifetime has undefined behavior. This code triggers CFI warnings. This

<    1   2   3   4   >