Re: r249721 - When mapping no_sanitize_* attributes to no_sanitize attributes, handle GNU-style formatting that involves prefix and suffix underscores. Cleans up other usages of similar functionality.

2015-10-08 Thread Adrian Zgorzalek via cfe-commits
Same story: warning: 'ownership_takes' attribute only applies to functions [-Wignored-attributes] __attribute__((ownership_takes(__))) void f(); ^ On Oct 8, 2015, at 2:52 PM, Richard Smith mailto:rich...@metafoo.co.uk>> wrote: On Thu, Oct 8, 2015 at 2:45 PM, Adrian Zgorza

Re: [PATCH] D12821: Allow for C's "writing off the end" idiom in __builtin_object_size

2015-10-08 Thread Richard Smith via cfe-commits
rsmith added inline comments. Comment at: lib/AST/ExprConstant.cpp:6311-6314 @@ +6310,6 @@ + QualType BaseType; + if (auto *E = Base.dyn_cast()) +BaseType = E->getType(); + else +BaseType = Base.get()->getType(); + // The outermost BaseType may be a pointer if we got a

Re: r249721 - When mapping no_sanitize_* attributes to no_sanitize attributes, handle GNU-style formatting that involves prefix and suffix underscores. Cleans up other usages of similar functionality.

2015-10-08 Thread Richard Smith via cfe-commits
On Thu, Oct 8, 2015 at 2:59 PM, Adrian Zgorzalek wrote: > Same story: > warning: 'ownership_takes' attribute only applies to functions > [-Wignored-attributes] > __attribute__((ownership_takes(__))) void f(); >^ > Oh, I see, you're building in C, and the diagnostic here

Re: r249721 - When mapping no_sanitize_* attributes to no_sanitize attributes, handle GNU-style formatting that involves prefix and suffix underscores. Cleans up other usages of similar functionality.

2015-10-08 Thread Adrian Zgorzalek via cfe-commits
Yay! It worked, thank you! On Oct 8, 2015, at 3:10 PM, Richard Smith mailto:rich...@metafoo.co.uk>> wrote: On Thu, Oct 8, 2015 at 2:59 PM, Adrian Zgorzalek mailto:a...@fb.com>> wrote: Same story: warning: 'ownership_takes' attribute only applies to functions [-Wignored-attributes] __attribut

[libcxx] r249761 - Split out of .

2015-10-08 Thread Richard Smith via cfe-commits
Author: rsmith Date: Thu Oct 8 17:25:27 2015 New Revision: 249761 URL: http://llvm.org/viewvc/llvm-project?rev=249761&view=rev Log: Split out of . There are a bunch of macros (__need_size_t etc) that request just one piece of ; if any one of these is defined, we just directly include the underl

Re: [PATCH] D12747: Implement [depr.c.headers]

2015-10-08 Thread Richard Smith via cfe-commits
On Thu, Oct 8, 2015 at 11:50 AM, Marshall Clow wrote: > On Tue, Oct 6, 2015 at 3:57 PM, Richard Smith > wrote: > >> . This one is tricky: >> >> 1) There's an (undocumented) interface between the C standard library and >> this header, where the macros __need_ptrdiff_t, __need_size_t, >> __need_wc

Re: r249721 - When mapping no_sanitize_* attributes to no_sanitize attributes, handle GNU-style formatting that involves prefix and suffix underscores. Cleans up other usages of similar functionality.

2015-10-08 Thread Richard Smith via cfe-commits
Please add the test to some existing test file for the ownership_takes attribute, such as test/Sema/attr-ownership.c. Otherwise, LGTM. On Thu, Oct 8, 2015 at 3:25 PM, Adrian Zgorzalek wrote: > Yay! It worked, thank you! > > > On Oct 8, 2015, at 3:10 PM, Richard Smith wrote: > > On Thu, Oct 8, 2

Re: [PATCH] D10834: Added functions to retrieve information about variable storage in libclang and its python bindings.

2015-10-08 Thread Richard Smith via cfe-commits
rsmith added inline comments. Comment at: include/clang-c/Index.h:3815-3823 @@ -3814,2 +3814,11 @@ /** + * \brief Returns true if a variable with function scope is a non-static local variable. + */ +CINDEX_LINKAGE bool clang_Cursor_hasLocalStorage(CXCursor C); + +/* + * \brief

Re: r249721 - When mapping no_sanitize_* attributes to no_sanitize attributes, handle GNU-style formatting that involves prefix and suffix underscores. Cleans up other usages of similar functionality.

2015-10-08 Thread Adrian Zgorzalek via cfe-commits
Moved the test. Feel free to commit it for me :) On Oct 8, 2015, at 3:29 PM, Richard Smith mailto:rich...@metafoo.co.uk>> wrote: Please add the test to some existing test file for the ownership_takes attribute, such as test/Sema/attr-ownership.c. Otherwise, LGTM. On Thu, Oct 8, 2015 at 3:25 P

r249775 - Expose -f[no]ms-{compatibility, extensions} in clang-cl (PR25114)

2015-10-08 Thread Hans Wennborg via cfe-commits
Author: hans Date: Thu Oct 8 18:13:28 2015 New Revision: 249775 URL: http://llvm.org/viewvc/llvm-project?rev=249775&view=rev Log: Expose -f[no]ms-{compatibility,extensions} in clang-cl (PR25114) These are enabled by default in clang-cl, because the whole idea is that it should work like cl.exe,

Re: [PATCH] D13453: Always generate cmake config files

2015-10-08 Thread NAKAMURA Takumi via cfe-commits
chapuni accepted this revision. This revision is now accepted and ready to land. Comment at: CMakeLists.txt:553 @@ -552,3 +552,3 @@ -if (CLANG_BUILT_STANDALONE) +if (CLANG_BUILT_STANDALONE OR CMAKE_VERSION VERSION_GREATER 3) # Generate a list of CMake library targets so that

[libc++] PR25118: move include_next after #pragma system_header

2015-10-08 Thread Richard Smith via cfe-commits
Hi, As noted in PR25118, people who include libc++'s headers via a -I path with -pedantic_errors will see errors due to the use of #include_next. This patch moves the #include_next after the #pragma system_header line to suppress the error. (For the __need_* case in , I'm not checking whether pra

[libcxx] r249780 - Fix test failure in C++98 mode due to imperfect static_assert emulation.

2015-10-08 Thread Richard Smith via cfe-commits
Author: rsmith Date: Thu Oct 8 18:44:26 2015 New Revision: 249780 URL: http://llvm.org/viewvc/llvm-project?rev=249780&view=rev Log: Fix test failure in C++98 mode due to imperfect static_assert emulation. Modified: libcxx/trunk/test/std/depr/depr.c.headers/stddef_h.pass.cpp Modified: libcxx

Re: [PATCH] D13408: Skip NonNull sema checks in unevaluated contexts.

2015-10-08 Thread Eric Fiselier via cfe-commits
EricWF updated the summary for this revision. EricWF updated this revision to Diff 36910. http://reviews.llvm.org/D13408 Files: lib/Sema/SemaChecking.cpp test/Sema/non-null-warning.c Index: test/Sema/non-null-warning.c === --- t

r249787 - Skip NonNull sema checks in unevaluated contexts.

2015-10-08 Thread Eric Fiselier via cfe-commits
Author: ericwf Date: Thu Oct 8 19:17:57 2015 New Revision: 249787 URL: http://llvm.org/viewvc/llvm-project?rev=249787&view=rev Log: Skip NonNull sema checks in unevaluated contexts. Summary: Currently when a function annotated with __attribute__((nonnull)) is called in an unevaluated context wi

Re: [libc++] PR25118: move include_next after #pragma system_header

2015-10-08 Thread Eric Fiselier via cfe-commits
The patch LGTM. However I would rather see the pragma in wrap itself in the `#if !defined(_LIBPP_HAS_NO_SYSTEM_HEADER_PRAGMA)`. I agree that we probably shouldn't include "<__config>". However people are still free to add the definition to the command line (line libc++ does when building and test

[libcxx] r249788 - PR25118: move system_header pragma before uses of include_next to avoid extension warnings for people finding libc++ headers via -I paths.

2015-10-08 Thread Richard Smith via cfe-commits
Author: rsmith Date: Thu Oct 8 19:26:50 2015 New Revision: 249788 URL: http://llvm.org/viewvc/llvm-project?rev=249788&view=rev Log: PR25118: move system_header pragma before uses of include_next to avoid extension warnings for people finding libc++ headers via -I paths. Modified: libcxx/tru

r249790 - Fix a few typos in the required feature set for some of the x86

2015-10-08 Thread Eric Christopher via cfe-commits
Author: echristo Date: Thu Oct 8 19:35:30 2015 New Revision: 249790 URL: http://llvm.org/viewvc/llvm-project?rev=249790&view=rev Log: Fix a few typos in the required feature set for some of the x86 builtins: avx512vd -> avx512vl rdrand -> rdrnd avx512ff -> avx512f no functional change. Modifie

Re: [PATCH] D12747: Implement [depr.c.headers]

2015-10-08 Thread Eric Fiselier via cfe-commits
Patch #10 LGTM. On Thu, Oct 8, 2015 at 4:28 PM, Richard Smith wrote: > On Thu, Oct 8, 2015 at 11:50 AM, Marshall Clow > wrote: >> >> On Tue, Oct 6, 2015 at 3:57 PM, Richard Smith >> wrote: >>> >>> . This one is tricky: >>> >>> 1) There's an (undocumented) interface between the C standard librar

Re: [PATCH] D12747: Implement [depr.c.headers]

2015-10-08 Thread Eric Fiselier via cfe-commits
Patch #11 LGTM. Any reason you removed the "#pragma diagnostic ignored "-Wnonnull"" in test/std/depr/depr.c.headers/stdlib_h.pass.cpp? I would like to leave it in so this test doesn't fail with older clang versions. /Eric On Thu, Oct 8, 2015 at 6:47 PM, Eric Fiselier wrote: > Patch #10 LGTM. > >

Re: [PATCH] D12747: Implement [depr.c.headers]

2015-10-08 Thread Eric Fiselier via cfe-commits
Patch #12 needs revision. A bunch of function definitions were moved out of the std namespace and into the global. That change is incorrect. On Thu, Oct 8, 2015 at 7:09 PM, Eric Fiselier wrote: > Patch #11 LGTM. Any reason you removed the "#pragma diagnostic ignored > "-Wnonnull"" in test/std/d

[libcxx] r249798 - Split out of .

2015-10-08 Thread Richard Smith via cfe-commits
Author: rsmith Date: Thu Oct 8 20:29:09 2015 New Revision: 249798 URL: http://llvm.org/viewvc/llvm-project?rev=249798&view=rev Log: Split out of . As with , skip our custom header if __need_FILE or __need___FILE is defined. Added: libcxx/trunk/include/stdio.h - copied, changed from

Re: [PATCH] D12747: Implement [depr.c.headers]

2015-10-08 Thread Eric Fiselier via cfe-commits
Patch #13 LGTM after revision. a system header pragma needs to be added to the __need_wint_t path of wchar.h. The existing pragma also needs fixing as previously discussed. On Thu, Oct 8, 2015 at 7:25 PM, Eric Fiselier wrote: > Patch #12 needs revision. A bunch of function definitions were moved

[libcxx] r249800 - Split out of .

2015-10-08 Thread Richard Smith via cfe-commits
Author: rsmith Date: Thu Oct 8 20:41:45 2015 New Revision: 249800 URL: http://llvm.org/viewvc/llvm-project?rev=249800&view=rev Log: Split out of . Added: libcxx/trunk/include/stdlib.h - copied, changed from r249736, libcxx/trunk/include/cstdlib Modified: libcxx/trunk/include/cstdl

Re: [PATCH] D12747: Implement [depr.c.headers]

2015-10-08 Thread Eric Fiselier via cfe-commits
Patch #14 LGTM modulo pragmas. On Thu, Oct 8, 2015 at 7:39 PM, Eric Fiselier wrote: > Patch #13 LGTM after revision. > > a system header pragma needs to be added to the __need_wint_t path of wchar.h. > The existing pragma also needs fixing as previously discussed. > > On Thu, Oct 8, 2015 at 7:25

r249801 - [Sema] Add "Ty" suffix to QualType variables for clarity (NFC)

2015-10-08 Thread Vedant Kumar via cfe-commits
Author: vedantk Date: Thu Oct 8 20:47:26 2015 New Revision: 249801 URL: http://llvm.org/viewvc/llvm-project?rev=249801&view=rev Log: [Sema] Add "Ty" suffix to QualType variables for clarity (NFC) Modified: cfe/trunk/lib/Sema/SemaExpr.cpp Modified: cfe/trunk/lib/Sema/SemaExpr.cpp URL: http:

Re: [PATCH] D13453: Always generate cmake config files

2015-10-08 Thread don hinton via cfe-commits
hintonda updated this revision to Diff 36916. hintonda added a comment. Add support for cmake version 3, i.e., 3.0.0... http://reviews.llvm.org/D13453 Files: CMakeLists.txt Index: CMakeLists.txt === --- CMakeLists.txt +++ CMakeL

Re: [PATCH] D12747: Implement [depr.c.headers]

2015-10-08 Thread Richard Smith via cfe-commits
On Thu, Oct 8, 2015 at 6:25 PM, Eric Fiselier wrote: > Patch #12 needs revision. A bunch of function definitions were moved > out of the std namespace and into the global. > That change is incorrect. Slightly updated version attached. I should probably explain what's going on here in more detai

Re: [PATCH] D13453: Always generate cmake config files

2015-10-08 Thread don hinton via cfe-commits
hintonda added a comment. Btw, I don't have commit access, so if you are happy with this change, could you commit it for me? http://reviews.llvm.org/D13453 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailma

Re: [PATCH] D12747: Implement [depr.c.headers]

2015-10-08 Thread Richard Smith via cfe-commits
Attached patch adds a test that all required functions from the C standard library (and any required overloads) are present with the correct types, and that the declarations in the and headers declare the same entity as required by [depr.c.headers]p2. On Thu, Oct 8, 2015 at 6:58 PM, Richard Smit

Re: [PATCH] D13546: [ATTR] Automatic line feed after pragma-like attribute.

2015-10-08 Thread Alexey Bataev via cfe-commits
ABataev updated this revision to Diff 36924. ABataev marked 2 inline comments as done. ABataev added a comment. Update after review http://reviews.llvm.org/D13546 Files: include/clang/Basic/Attr.td lib/AST/DeclPrinter.cpp test/Misc/ast-print-pragmas.cpp utils/TableGen/ClangAttrEmitter.c

Re: [PATCH] D12747: Implement [depr.c.headers]

2015-10-08 Thread Richard Smith via cfe-commits
On Thu, Oct 8, 2015 at 6:58 PM, Richard Smith wrote: > On Thu, Oct 8, 2015 at 6:25 PM, Eric Fiselier wrote: > >> Patch #12 needs revision. A bunch of function definitions were moved >> out of the std namespace and into the global. >> That change is incorrect. > > > Slightly updated version attac

<    1   2