[PATCH] D24886: Add [[clang::suppress(rule, ...)]] attribute

2017-10-29 Thread Hristo Hristov via Phabricator via cfe-commits
roccoor added a comment.

Microsoft supports:

  [[gsl::suppress(bounds.3)]]

Clang requires:

  [[gsl::suppress("bounds.3")]]

Why is this inconsistency?

Here is an example from  CppCoreGuidelines

  [[suppress(bounds)]] char* raw_find(char* p, int n, char x)// find x in 
p[0]..p[n - 1]
  {
  // ...
  }


Repository:
  rL LLVM

https://reviews.llvm.org/D24886



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D38683: [X86][AVX512] lowering broadcastm intrinsic - clang part

2017-10-29 Thread Simon Pilgrim via Phabricator via cfe-commits
RKSimon accepted this revision.
RKSimon added a comment.
This revision is now accepted and ready to land.

LGTM


https://reviews.llvm.org/D38683



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


Re: [PATCH] D39360: [C++11] Don't put empty quotes in static_assert diagnostic.

2017-10-29 Thread Kim Gräsman via cfe-commits
A clang-tidy check to remove empty messages from source would be nice,
though...

- Kim

Den 27 okt. 2017 10:24 fm skrev "Nicolas Lesser via Phabricator" <
revi...@reviews.llvm.org>:

> Rakete abandoned this revision.
> Rakete added a comment.
>
> @kimgr Well, mostly because they bother me a bit, don't know what others
> think though. I just thought it would be nice if they didn't appear, mainly
> because there is no need to show empty quotes in the error message. Hmm,
> you have a point though... Didn't think of that. Thanks +1
>
>
> https://reviews.llvm.org/D39360
>
>
>
>
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[libcxx] r316867 - Issues to be voted on in ABQ

2017-10-29 Thread Marshall Clow via cfe-commits
Author: marshall
Date: Sun Oct 29 12:02:00 2017
New Revision: 316867

URL: http://llvm.org/viewvc/llvm-project?rev=316867&view=rev
Log:
Issues to be voted on in ABQ

Modified:
libcxx/trunk/www/upcoming_meeting.html

Modified: libcxx/trunk/www/upcoming_meeting.html
URL: 
http://llvm.org/viewvc/llvm-project/libcxx/trunk/www/upcoming_meeting.html?rev=316867&r1=316866&r2=316867&view=diff
==
--- libcxx/trunk/www/upcoming_meeting.html (original)
+++ libcxx/trunk/www/upcoming_meeting.html Sun Oct 29 12:02:00 2017
@@ -59,42 +59,61 @@
   
Issue #Issue 
NameMeetingStatus
 
-   https://wg21.link/LWG2444";>2444Inconsistent complexity for 
std::sort_heapToronto
-   https://wg21.link/LWG2593";>2593Moved-from 
state of AllocatorsToronto
-   https://wg21.link/LWG2597";>2597std::log 
misspecified for complex numbersToronto
-   https://wg21.link/LWG2783";>2783stack::emplace() and 
queue::emplace() should return decltype(auto)Toronto
-   https://wg21.link/LWG2932";>2932Constraints on parallel 
algorithm implementations are underspecifiedToronto
-   https://wg21.link/LWG2937";>2937Is 
equivalent("existing_thing", "not_existing_thing") an 
error?TorontoComplete
-   https://wg21.link/LWG2940";>2940result_of 
specification also needs a little cleanupToronto
-   https://wg21.link/LWG2942";>2942LWG 2873's 
resolution missed weak_ptr::owner_beforeToronto
-   https://wg21.link/LWG2954";>2954Specialization of the 
convenience variable templates should be 
prohibitedToronto
-   https://wg21.link/LWG2961";>2961Bad 
postcondition for set_default_resourceToronto
-   https://wg21.link/LWG2966";>2966Incomplete 
resolution of US 74Toronto
-   https://wg21.link/LWG2974";>2974Diagnose 
out of bounds 
tuple_element/variant_alternativeToronto
-
-   Priority 1 
Bugs
-   https://wg21.link/LWG2665";>2665remove_filename() post 
condition is incorrectTorontoWe do this already
-
-   Immediate Issues in 
Toronto
-   https://wg21.link/LWG2901";>2901Variants 
cannot properly support allocatorsTorontoWe do this 
already
-   https://wg21.link/LWG2956";>2956filesystem::canonical()
 still defined in terms of absolute(p, 
base)Toronto
+   https://wg21.link/2779";>2779[networking.ts] Relax 
requirements on buffer sequence iteratorsAlbuquerque
+   https://wg21.link/2870";>2870Default value 
of parameter theta of polar should be 
dependentAlbuquerque
+   https://wg21.link/2935";>2935What should 
create_directories do when p already exists but is not a 
directory?Albuquerque
+   https://wg21.link/2941";>2941§[thread.req.timing] wording 
should apply to both member and namespace-level 
functionsAlbuquerque
+   https://wg21.link/2944";>2944LWG 2905 
accidentally removed requirement that construction of the deleter doesn't throw 
an exceptionAlbuquerque
+   https://wg21.link/2945";>2945Order of 
template parameters in optional 
comparisonsAlbuquerque
+   https://wg21.link/2948";>2948unique_ptr 
does not define operator<< for stream 
outputAlbuquerque
+   https://wg21.link/2950";>2950std::byte 
operations are misspecifiedAlbuquerque
+   https://wg21.link/2952";>2952iterator_traits should work for 
pointers to cv TAlbuquerque
+   https://wg21.link/2953";>2953LWG 2853 
should apply to deque::erase tooAlbuquerque
+   https://wg21.link/2964";>2964Apparently 
redundant requirement for 
dynamic_pointer_castAlbuquerque
+   https://wg21.link/2965";>2965Non-existing 
path::native_string() in filesystem_error::what() 
specificationAlbuquerque
+   https://wg21.link/2972";>2972What is 
is_trivially_destructible_v? Yes 
Albuquerque
+   https://wg21.link/2976";>2976Dangling 
uses_allocator specialization for 
packaged_taskAlbuquerque
+   https://wg21.link/2977";>2977unordered_meow::merge() has 
incorrect Throws: clauseAlbuquerque
+   https://wg21.link/2978";>2978Hash support 
for pmr::string and friendsAlbuquerque
+   https://wg21.link/2979";>2979aligned_union 
should require complete object typesAlbuquerque
+   https://wg21.link/2980";>2980Cannot 
compare_exchange empty pointersYes 
Albuquerque
+   https://wg21.link/2981";>2981Remove 
redundant deduction guides from standard 
libraryAlbuquerque
+   https://wg21.link/2982";>2982Making 
size_type consistent in associative container deduction 
guidesAlbuquerque
+   https://wg21.link/2988";>2988Clause 32 
cleanup missed one typenameAlbuquerque
+   https://wg21.link/2993";>2993reference_wrapper conversion 
from T&&Albuquerque
+   https://wg21.link/2998";>2998Requirements 
on function objects passed to {forward_,}list-specific 
algorithmsAlbuquerque
+   https://wg21.link/3001";>3001weak_ptr::element_type needs 
remove_extent_tAlbuquerque
+   https://wg21.link/3024";>3024variant's 
copies must be deleted instead of disabled via 
SFINAEAlbuquerque
 

[libcxx] r316873 - Update status of 2950

2017-10-29 Thread Marshall Clow via cfe-commits
Author: marshall
Date: Sun Oct 29 14:43:30 2017
New Revision: 316873

URL: http://llvm.org/viewvc/llvm-project?rev=316873&view=rev
Log:
Update status of 2950

Modified:
libcxx/trunk/www/upcoming_meeting.html

Modified: libcxx/trunk/www/upcoming_meeting.html
URL: 
http://llvm.org/viewvc/llvm-project/libcxx/trunk/www/upcoming_meeting.html?rev=316873&r1=316872&r2=316873&view=diff
==
--- libcxx/trunk/www/upcoming_meeting.html (original)
+++ libcxx/trunk/www/upcoming_meeting.html Sun Oct 29 14:43:30 2017
@@ -66,17 +66,17 @@
https://wg21.link/2944";>2944LWG 2905 
accidentally removed requirement that construction of the deleter doesn't throw 
an exceptionAlbuquerque
https://wg21.link/2945";>2945Order of 
template parameters in optional 
comparisonsAlbuquerque
https://wg21.link/2948";>2948unique_ptr 
does not define operator<< for stream 
outputAlbuquerque
-   https://wg21.link/2950";>2950std::byte 
operations are misspecifiedAlbuquerque
+   https://wg21.link/2950";>2950std::byte 
operations are misspecifiedAlbuquerquePatch Ready
https://wg21.link/2952";>2952iterator_traits should work for 
pointers to cv TAlbuquerque
https://wg21.link/2953";>2953LWG 2853 
should apply to deque::erase tooAlbuquerque
https://wg21.link/2964";>2964Apparently 
redundant requirement for 
dynamic_pointer_castAlbuquerque
https://wg21.link/2965";>2965Non-existing 
path::native_string() in filesystem_error::what() 
specificationAlbuquerque
-   https://wg21.link/2972";>2972What is 
is_trivially_destructible_v? Yes 
Albuquerque
+   https://wg21.link/2972";>2972What is 
is_trivially_destructible_v?Albuquerque
https://wg21.link/2976";>2976Dangling 
uses_allocator specialization for 
packaged_taskAlbuquerque
https://wg21.link/2977";>2977unordered_meow::merge() has 
incorrect Throws: clauseAlbuquerque
https://wg21.link/2978";>2978Hash support 
for pmr::string and friendsAlbuquerque
https://wg21.link/2979";>2979aligned_union 
should require complete object typesAlbuquerque
-   https://wg21.link/2980";>2980Cannot 
compare_exchange empty pointersYes 
Albuquerque
+   https://wg21.link/2980";>2980Cannot 
compare_exchange empty pointersAlbuquerque
https://wg21.link/2981";>2981Remove 
redundant deduction guides from standard 
libraryAlbuquerque
https://wg21.link/2982";>2982Making 
size_type consistent in associative container deduction 
guidesAlbuquerque
https://wg21.link/2988";>2988Clause 32 
cleanup missed one typenameAlbuquerque
@@ -96,7 +96,7 @@
 2944 - 
 2945 - 
 2948 - 
-2950 - 
+2950 - Patch ready
 2952 - 
 2953 - 
 2964 - 


___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[libcxx] r316874 - Initial triage

2017-10-29 Thread Marshall Clow via cfe-commits
Author: marshall
Date: Sun Oct 29 14:57:58 2017
New Revision: 316874

URL: http://llvm.org/viewvc/llvm-project?rev=316874&view=rev
Log:
Initial triage

Modified:
libcxx/trunk/www/upcoming_meeting.html

Modified: libcxx/trunk/www/upcoming_meeting.html
URL: 
http://llvm.org/viewvc/llvm-project/libcxx/trunk/www/upcoming_meeting.html?rev=316874&r1=316873&r2=316874&view=diff
==
--- libcxx/trunk/www/upcoming_meeting.html (original)
+++ libcxx/trunk/www/upcoming_meeting.html Sun Oct 29 14:57:58 2017
@@ -90,29 +90,29 @@
 Comments about the issues
 
 2779 - 
-2870 - 
-2935 - 
-2941 - 
-2944 - 
-2945 - 
+2870 - We already default to T(0); but the PR says 
T()
+2935 - Eric? 
+2941 - Looks like wording changes; need to check to be sure.
+2944 - Definitely just wording changes. 
+2945 - Looks like we already do it; needs a close look to be sure.
 2948 - 
 2950 - Patch ready
 2952 - 
-2953 - 
-2964 - 
-2965 - 
-2972 - 
-2976 - 
-2977 - 
-2978 - 
-2979 - 
+2953 - Probably just wording; check to be sure.
+2964 - At the very least, it needs a test.
+2965 - Eric? 
+2972 - Shouldn't need any code; needs tests.
+2976 - Looks simple. 
+2977 - Wording cleanup 
+2978 - Straightforward. 
+2979 - Tests. 
 2980 - 
 2981 - 
 2982 - 
-2988 - 
+2988 - Simple 
 2993 - 
-2998 - 
-3001 - 
+2998 - Wording. 
+3001 - Looks simple. 
 3024 - 
 
 


___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D39177: [CodeGen] Generate TBAA info for reference loads

2017-10-29 Thread John McCall via Phabricator via cfe-commits
rjmccall accepted this revision.
rjmccall added a comment.
This revision is now accepted and ready to land.

Looks good; sorry for not catching that, either.


https://reviews.llvm.org/D39177



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D39374: CodeGen: Fix insertion position of addrspace cast for alloca

2017-10-29 Thread John McCall via Phabricator via cfe-commits
rjmccall accepted this revision.
rjmccall added a comment.
This revision is now accepted and ready to land.

Ok.


https://reviews.llvm.org/D39374



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D39008: [CodeGen] Propagate may-alias'ness of lvalues with TBAA info

2017-10-29 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment.

Looks good, but you missed updating equality/hashing for the new Kind field.




Comment at: lib/CodeGen/CodeGenTBAA.h:71
AccessType == Other.AccessType &&
Offset == Other.Offset;
   }

This needs to factor in the Kind.



Comment at: lib/CodeGen/CodeGenTBAA.h:205
DenseMapInfo::getHashValue(Val.AccessType) ^
DenseMapInfo::getHashValue(Val.Offset);
   }

This needs to factor in the Kind.


https://reviews.llvm.org/D39008



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D39412: [Driver] Give LIBRARY_PATH precedence over native toolchains

2017-10-29 Thread Zhihao Yuan via Phabricator via cfe-commits
lichray created this revision.
Herald added subscribers: aheejin, jgravelle-google, sbc100, nhaehnle, dschuff, 
jfb, emaste.

`LIBRARY_PATH` expansion should happen before expanding native toolchains' 
linker arguments, if any, to allow overriding the default standard libraries to 
link.  GCC supports this practice as well.

Factor the code expanding `LIBRARY_PATH` out of `AddLinkerInputs` into 
`AddLibraryPaths` add let the platform-specific code decide the appropriate 
order for these flags.

Fixes: https://bugs.llvm.org/show_bug.cgi?id=16786


https://reviews.llvm.org/D39412

Files:
  lib/Driver/ToolChains/AMDGPU.cpp
  lib/Driver/ToolChains/AVR.cpp
  lib/Driver/ToolChains/Ananas.cpp
  lib/Driver/ToolChains/BareMetal.cpp
  lib/Driver/ToolChains/CloudABI.cpp
  lib/Driver/ToolChains/CommonArgs.cpp
  lib/Driver/ToolChains/CommonArgs.h
  lib/Driver/ToolChains/CrossWindows.cpp
  lib/Driver/ToolChains/Darwin.cpp
  lib/Driver/ToolChains/DragonFly.cpp
  lib/Driver/ToolChains/FreeBSD.cpp
  lib/Driver/ToolChains/Fuchsia.cpp
  lib/Driver/ToolChains/Gnu.cpp
  lib/Driver/ToolChains/Hexagon.cpp
  lib/Driver/ToolChains/MinGW.cpp
  lib/Driver/ToolChains/Minix.cpp
  lib/Driver/ToolChains/Myriad.cpp
  lib/Driver/ToolChains/NaCl.cpp
  lib/Driver/ToolChains/NetBSD.cpp
  lib/Driver/ToolChains/OpenBSD.cpp
  lib/Driver/ToolChains/PS4CPU.cpp
  lib/Driver/ToolChains/Solaris.cpp
  lib/Driver/ToolChains/WebAssembly.cpp
  lib/Driver/ToolChains/XCore.cpp

Index: lib/Driver/ToolChains/XCore.cpp
===
--- lib/Driver/ToolChains/XCore.cpp
+++ lib/Driver/ToolChains/XCore.cpp
@@ -79,6 +79,7 @@
 CmdArgs.push_back("-fexceptions");
 
   AddLinkerInputs(getToolChain(), Inputs, Args, CmdArgs, JA);
+  AddLibraryPaths(getToolChain(), Args, CmdArgs);
 
   const char *Exec = Args.MakeArgString(getToolChain().GetProgramPath("xcc"));
   C.addCommand(llvm::make_unique(JA, *this, Exec, CmdArgs, Inputs));
Index: lib/Driver/ToolChains/WebAssembly.cpp
===
--- lib/Driver/ToolChains/WebAssembly.cpp
+++ lib/Driver/ToolChains/WebAssembly.cpp
@@ -47,6 +47,7 @@
 CmdArgs.push_back("--strip-all");
 
   Args.AddAllArgs(CmdArgs, options::OPT_L);
+  AddLibraryPaths(ToolChain, Args, CmdArgs);
   ToolChain.AddFilePathLibArgs(Args, CmdArgs);
 
   if (!Args.hasArg(options::OPT_nostdlib, options::OPT_nostartfiles))
Index: lib/Driver/ToolChains/Solaris.cpp
===
--- lib/Driver/ToolChains/Solaris.cpp
+++ lib/Driver/ToolChains/Solaris.cpp
@@ -92,6 +92,7 @@
 Args.MakeArgString(getToolChain().GetFilePath("crtbegin.o")));
   }
 
+  AddLibraryPaths(getToolChain(), Args, CmdArgs);
   getToolChain().AddFilePathLibArgs(Args, CmdArgs);
 
   Args.AddAllArgs(CmdArgs, {options::OPT_L, options::OPT_T_Group,
Index: lib/Driver/ToolChains/PS4CPU.cpp
===
--- lib/Driver/ToolChains/PS4CPU.cpp
+++ lib/Driver/ToolChains/PS4CPU.cpp
@@ -25,6 +25,7 @@
 using namespace llvm::opt;
 
 using clang::driver::tools::AddLinkerInputs;
+using clang::driver::tools::AddLibraryPaths;
 
 void tools::PS4cpu::addProfileRTArgs(const ToolChain &TC, const ArgList &Args,
  ArgStringList &CmdArgs) {
@@ -125,6 +126,7 @@
 CmdArgs.push_back("--no-demangle");
 
   AddLinkerInputs(ToolChain, Inputs, Args, CmdArgs, JA);
+  AddLibraryPaths(ToolChain, Args, CmdArgs);
 
   if (Args.hasArg(options::OPT_pthread)) {
 CmdArgs.push_back("-lpthread");
@@ -210,6 +212,7 @@
   }
 
   Args.AddAllArgs(CmdArgs, options::OPT_L);
+  AddLibraryPaths(ToolChain, Args, CmdArgs);
   ToolChain.AddFilePathLibArgs(Args, CmdArgs);
   Args.AddAllArgs(CmdArgs, options::OPT_T_Group);
   Args.AddAllArgs(CmdArgs, options::OPT_e);
Index: lib/Driver/ToolChains/OpenBSD.cpp
===
--- lib/Driver/ToolChains/OpenBSD.cpp
+++ lib/Driver/ToolChains/OpenBSD.cpp
@@ -165,6 +165,8 @@
 }
   }
 
+  AddLibraryPaths(getToolChain(), Args, CmdArgs);
+
   std::string Triple = getToolChain().getTripleString();
   if (Triple.substr(0, 6) == "x86_64")
 Triple.replace(0, 6, "amd64");
Index: lib/Driver/ToolChains/NetBSD.cpp
===
--- lib/Driver/ToolChains/NetBSD.cpp
+++ lib/Driver/ToolChains/NetBSD.cpp
@@ -249,6 +249,7 @@
 
   bool NeedsSanitizerDeps = addSanitizerRuntimes(getToolChain(), Args, CmdArgs);
   AddLinkerInputs(getToolChain(), Inputs, Args, CmdArgs, JA);
+  AddLibraryPaths(getToolChain(), Args, CmdArgs);
 
   unsigned Major, Minor, Micro;
   getToolChain().getTriple().getOSVersion(Major, Minor, Micro);
Index: lib/Driver/ToolChains/NaCl.cpp
===
--- lib/Driver/ToolChains/NaCl.cpp
+++ lib/Driver/ToolChains/NaCl.cpp
@@ -124,6 +124,7 @@
   Args.AddAllArgs(CmdArgs, options: