Re: [PATCH] Warning for main returning a bool.

2016-11-06 Thread Michał Górny via cfe-commits
On Fri, 14 Oct 2016 17:17:59 +
Joshua Hurwitz via cfe-commits  wrote:

> See attached.
> 
> Returning a bool from main is a special case of return type mismatch. The
> common convention when returning a bool is that 'true' (== 1) indicates
> success and 'false' (== 0) failure. But since main expects a return value
> of 0 on success, returning a bool is usually unintended.

This triggers a false positive if you use a boolean expression like:

  return !foo;

i.e. whenever user intentionally inverts a 'non-zero success' into 'zero
success'.

-- 
Best regards,
Michał Górny



pgpCBaeN4Nmc1.pgp
Description: OpenPGP digital signature
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D26139: Tests for strings conversions under libcpp-no-exceptions

2016-11-06 Thread Asiri Rathnayake via cfe-commits
rmaprath added a comment.

In https://reviews.llvm.org/D26139#587587, @mclow.lists wrote:

> >   I think it might be better to add TEST_TRY and TEST_CATCH(...) macros 
> > defined like
>
> @rogfer01 said at the top that he didn't want to add "a magical TEST_TRY 
> macro" - and I agree.  Someone tried that in another review, and I nixed it 
> there.


I had a proposal for something along those lines in 
https://reviews.llvm.org/D14653, however those TEST_TRY and TEST_CATCH macros 
were trying to be "too smart".

I agree, having macros for `try` and `catch` sounds to me like it would set the 
wrong precedent.


https://reviews.llvm.org/D26139



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


[PATCH] D26288: Deduplicate replacements by FileEntry instead of file names.

2016-11-06 Thread Eric Liu via cfe-commits
ioeric added a comment.

Since Manuel's comment has been addressed, I'd like to land this if there is no 
objection.


https://reviews.llvm.org/D26288



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


[PATCH] D26335: [ms] Reinstate https://reviews.llvm.org/D14748 after https://reviews.llvm.org/D20291

2016-11-06 Thread Nico Weber via cfe-commits
thakis created this revision.
thakis added a reviewer: hans.
thakis added a subscriber: cfe-commits.

https://reviews.llvm.org/D26335

Files:
  lib/Headers/x86intrin.h
  test/Headers/tzcnt.c


Index: test/Headers/tzcnt.c
===
--- test/Headers/tzcnt.c
+++ test/Headers/tzcnt.c
@@ -0,0 +1,23 @@
+// RUN: %clang_cc1 -triple i386-pc-win32 -target-cpu broadwell \
+// RUN: -fms-extensions -fms-compatibility 
-fms-compatibility-version=17.00 \
+// RUN: -ffreestanding -emit-obj -o /dev/null -Werror \
+// RUN: -isystem %S/Inputs/include %s
+
+// RUN: %clang_cc1 -triple x86_64-pc-win32  \
+// RUN: -fms-extensions -fms-compatibility 
-fms-compatibility-version=17.00 \
+// RUN: -ffreestanding -emit-obj -o /dev/null -Werror \
+// RUN: -isystem %S/Inputs/include %s
+//
+// REQUIRES: x86-registered-target
+
+typedef __SIZE_TYPE__ size_t;
+#include 
+
+void f() {
+  // Check that _tzcnt is available even without BMI; ffmpeg relies on this.
+  __tzcnt_u16(0);
+  __tzcnt_u32(0);
+#ifdef __x86_64__
+  __tzcnt_u64(0);
+#endif
+}
Index: lib/Headers/x86intrin.h
===
--- lib/Headers/x86intrin.h
+++ lib/Headers/x86intrin.h
@@ -34,6 +34,25 @@
 
 #if !defined(_MSC_VER) || __has_feature(modules) || defined(__BMI__)
 #include 
+#else
+/* The TZCNT is special in that it's encoded in a backward-compatible way and
+ * behaves as BSF on non-BMI targets, hence some compilers provide it even
+ * if the target doesn't support BMI instructions.  LLVM won't emit the TZCNT
+ * instruction if BMI isn't available, but to not break code assuming
+ * unconditional availability of the tzcnt instruction, provide the intrinsic
+ * here (with a BMI-independent implementation). */
+#define _tzcnt_u16(a) (__tzcnt_u16((a)))
+#define _tzcnt_u32(a) (__tzcnt_u32((a)))
+static __inline__ unsigned short __attribute__((__always_inline__, 
__nodebug__))
+__tzcnt_u16(unsigned short __X) { return __X ? __builtin_ctzs(__X) : 16; }
+static __inline__ unsigned int __attribute__((__always_inline__, __nodebug__))
+__tzcnt_u32(unsigned int __X) { return __X ? __builtin_ctz(__X) : 32; }
+#ifdef __x86_64__
+#define _tzcnt_u64(a) (__tzcnt_u64((a)))
+static __inline__ unsigned long long
+__attribute__((__always_inline__, __nodebug__))
+__tzcnt_u64(unsigned long long __X) { return __X ? __builtin_ctzll(__X) : 64; }
+#endif /* __x86_64__ */
 #endif
 
 #if !defined(_MSC_VER) || __has_feature(modules) || defined(__BMI2__)


Index: test/Headers/tzcnt.c
===
--- test/Headers/tzcnt.c
+++ test/Headers/tzcnt.c
@@ -0,0 +1,23 @@
+// RUN: %clang_cc1 -triple i386-pc-win32 -target-cpu broadwell \
+// RUN: -fms-extensions -fms-compatibility -fms-compatibility-version=17.00 \
+// RUN: -ffreestanding -emit-obj -o /dev/null -Werror \
+// RUN: -isystem %S/Inputs/include %s
+
+// RUN: %clang_cc1 -triple x86_64-pc-win32  \
+// RUN: -fms-extensions -fms-compatibility -fms-compatibility-version=17.00 \
+// RUN: -ffreestanding -emit-obj -o /dev/null -Werror \
+// RUN: -isystem %S/Inputs/include %s
+//
+// REQUIRES: x86-registered-target
+
+typedef __SIZE_TYPE__ size_t;
+#include 
+
+void f() {
+  // Check that _tzcnt is available even without BMI; ffmpeg relies on this.
+  __tzcnt_u16(0);
+  __tzcnt_u32(0);
+#ifdef __x86_64__
+  __tzcnt_u64(0);
+#endif
+}
Index: lib/Headers/x86intrin.h
===
--- lib/Headers/x86intrin.h
+++ lib/Headers/x86intrin.h
@@ -34,6 +34,25 @@
 
 #if !defined(_MSC_VER) || __has_feature(modules) || defined(__BMI__)
 #include 
+#else
+/* The TZCNT is special in that it's encoded in a backward-compatible way and
+ * behaves as BSF on non-BMI targets, hence some compilers provide it even
+ * if the target doesn't support BMI instructions.  LLVM won't emit the TZCNT
+ * instruction if BMI isn't available, but to not break code assuming
+ * unconditional availability of the tzcnt instruction, provide the intrinsic
+ * here (with a BMI-independent implementation). */
+#define _tzcnt_u16(a) (__tzcnt_u16((a)))
+#define _tzcnt_u32(a) (__tzcnt_u32((a)))
+static __inline__ unsigned short __attribute__((__always_inline__, __nodebug__))
+__tzcnt_u16(unsigned short __X) { return __X ? __builtin_ctzs(__X) : 16; }
+static __inline__ unsigned int __attribute__((__always_inline__, __nodebug__))
+__tzcnt_u32(unsigned int __X) { return __X ? __builtin_ctz(__X) : 32; }
+#ifdef __x86_64__
+#define _tzcnt_u64(a) (__tzcnt_u64((a)))
+static __inline__ unsigned long long
+__attribute__((__always_inline__, __nodebug__))
+__tzcnt_u64(unsigned long long __X) { return __X ? __builtin_ctzll(__X) : 64; }
+#endif /* __x86_64__ */
 #endif
 
 #if !defined(_MSC_VER) || __has_feature(modules) || defined(__BMI2__)
___
cfe-commits mailing list
cfe-commits@

[PATCH] D18073: Add memory allocating functions

2016-11-06 Thread Alexander Riccio via cfe-commits
ariccio added a comment.

Nevermind, the order is correct!


https://reviews.llvm.org/D18073



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


[PATCH] D21298: [Clang-tidy] delete null check

2016-11-06 Thread Gergely Angeli via cfe-commits
SilverGeri updated this revision to Diff 76893.

https://reviews.llvm.org/D21298

Files:
  clang-tidy/misc/CMakeLists.txt
  clang-tidy/misc/DeleteNullPointerCheck.cpp
  clang-tidy/misc/DeleteNullPointerCheck.h
  clang-tidy/misc/MiscTidyModule.cpp
  docs/clang-tidy/checks/list.rst
  docs/clang-tidy/checks/misc-delete-null-pointer.rst
  test/clang-tidy/misc-delete-null-pointer.cpp

Index: test/clang-tidy/misc-delete-null-pointer.cpp
===
--- /dev/null
+++ test/clang-tidy/misc-delete-null-pointer.cpp
@@ -0,0 +1,29 @@
+// RUN: %check_clang_tidy %s misc-delete-null-pointer %t
+
+void f() {
+  int *p = 0;
+  if (p) {
+// CHECK-MESSAGES: :[[@LINE-1]]:3: warning: if statement is unnecessary (deleting null pointer has no effect) [misc-delete-null-pointer]
+delete p;
+  }
+  // CHECK-FIXES: delete p;
+  int *p3 = new int[3];
+  if (p3)
+// CHECK-MESSAGES: :[[@LINE-1]]:3: warning: if statement is unnecessary (deleting null pointer has no effect) [misc-delete-null-pointer]
+delete[] p3;
+  // CHECK-FIXES: delete[] p3;
+}
+
+void g() {
+  int *p, *p2;
+  if (p)
+delete p2;
+
+  if (p && p2)
+delete p;
+
+  if (p2) {
+int x = 5;
+delete p2;
+  }
+}
Index: docs/clang-tidy/checks/misc-delete-null-pointer.rst
===
--- /dev/null
+++ docs/clang-tidy/checks/misc-delete-null-pointer.rst
@@ -0,0 +1,12 @@
+.. title:: clang-tidy - misc-delete-null-pointer
+
+misc-delete-null-pointer
+
+
+Checks the if statements where a pointer's existence is checked and then deletes the pointer.
+The check is unnecessary as deleting a nullpointer has no effect.
+
+.. code:: c++
+  int *p;
+  if (p)
+delete p;
Index: docs/clang-tidy/checks/list.rst
===
--- docs/clang-tidy/checks/list.rst
+++ docs/clang-tidy/checks/list.rst
@@ -58,6 +58,7 @@
misc-bool-pointer-implicit-conversion
misc-dangling-handle
misc-definitions-in-headers
+   misc-delete-null-pointer
misc-fold-init-type
misc-forward-declaration-namespace
misc-inaccurate-erase
Index: clang-tidy/misc/MiscTidyModule.cpp
===
--- clang-tidy/misc/MiscTidyModule.cpp
+++ clang-tidy/misc/MiscTidyModule.cpp
@@ -12,6 +12,7 @@
 #include "../ClangTidyModuleRegistry.h"
 #include "ArgumentCommentCheck.h"
 #include "AssertSideEffectCheck.h"
+#include "DeleteNullPointerCheck.h"
 #include "MisplacedConstCheck.h"
 #include "UnconventionalAssignOperatorCheck.h"
 #include "BoolPointerImplicitConversionCheck.h"
@@ -63,6 +64,8 @@
 CheckFactories.registerCheck("misc-argument-comment");
 CheckFactories.registerCheck(
 "misc-assert-side-effect");
+CheckFactories.registerCheck(
+"misc-delete-null-pointer");
 CheckFactories.registerCheck(
 "misc-misplaced-const");
 CheckFactories.registerCheck(
Index: clang-tidy/misc/DeleteNullPointerCheck.h
===
--- /dev/null
+++ clang-tidy/misc/DeleteNullPointerCheck.h
@@ -0,0 +1,35 @@
+//===--- DeleteNullPointerCheck.h - clang-tidy---*- C++ -*-===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===--===//
+
+#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_MISC_DELETE_NULL_POINTER_H
+#define LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_MISC_DELETE_NULL_POINTER_H
+
+#include "../ClangTidy.h"
+
+namespace clang {
+namespace tidy {
+namespace misc {
+
+/// FIXME: Write a short description.
+///
+/// For the user-facing documentation see:
+/// http://clang.llvm.org/extra/clang-tidy/checks/misc-delete-null-pointer.html
+class DeleteNullPointerCheck : public ClangTidyCheck {
+public:
+  DeleteNullPointerCheck(StringRef Name, ClangTidyContext *Context)
+  : ClangTidyCheck(Name, Context) {}
+  void registerMatchers(ast_matchers::MatchFinder *Finder) override;
+  void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
+};
+
+} // namespace misc
+} // namespace tidy
+} // namespace clang
+
+#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_MISC_DELETE_NULL_POINTER_H
Index: clang-tidy/misc/DeleteNullPointerCheck.cpp
===
--- /dev/null
+++ clang-tidy/misc/DeleteNullPointerCheck.cpp
@@ -0,0 +1,58 @@
+//===--- DeleteNullPointerCheck.cpp - clang-tidy---===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===--===//
+
+#include "DeleteNullPointerCheck.

[PATCH] D18073: Add memory allocating functions

2016-11-06 Thread Devin Coughlin via cfe-commits
dcoughlin added a comment.

Thanks for iterating on the patch! Some comments in-line.




Comment at: llvm/tools/clang/lib/StaticAnalyzer/Checkers/MallocChecker.cpp:569
+  // allocating functions initialized to nullptr, which will never equal a
+  //non-null IdentifierInfo*, and never trigger on a non-Windows platform.
+  if (Ctx.getTargetInfo().getTriple().isWindowsMSVCEnvironment()) {

Please add a space here to align with the rest of the comment.



Comment at: llvm/tools/clang/lib/StaticAnalyzer/Checkers/MallocChecker.cpp:622
+  if (FD->getKind() == Decl::Function) {
+if(isStandardNewDelete(FD, C))
+  return false;

The identifier info is null for other operators as well (e.g., +). 
If you want to bail early when the identifier for a function is null, you 
should do so directly instead of trying to enumerate all cases.

For example:
```
if (!FunI)
  return false;
```
This will be future-proof in case additional additional kinds of function 
declarations are added without identifiers.



Comment at: llvm/tools/clang/lib/StaticAnalyzer/Checkers/MallocChecker.cpp:648
+ }
+}
+

The indentation seems off here.



Comment at: llvm/tools/clang/lib/StaticAnalyzer/Checkers/MallocChecker.cpp:664
+  && FunI == II_win_alloca)) {
+assert(!isStandardNewDelete(FD, C) && "We should not reach this point"
+  "with a C++ operator.");

You should remove this assert.

Since you have guaranteed that you are targeting windows before checking and 
you initially II_win_alloca to a non-null value when targeting windows it can 
never be the case that II_win_alloca will be null here.



Comment at: llvm/tools/clang/lib/StaticAnalyzer/Checkers/MallocChecker.cpp:814
+initIdentifierInfo(C.getASTContext());
+IdentifierInfo *FunI = FD->getIdentifier();
+

Do you want to do the same early bailout for an operator here also?



Comment at: llvm/tools/clang/lib/StaticAnalyzer/Checkers/MallocChecker.cpp:850
+   && FunI == II_realloc_dbg) &&
+   !isStandardNewDelete(FD, C.getASTContext())) {
+  State = ReallocMem(C, CE, false, State);

I don't think the `!isStandardNewDelete()` is needed here.

Also, this is triggering -Wlogical-op-parentheses for me when building with 
clang.



Comment at: llvm/tools/clang/lib/StaticAnalyzer/Checkers/MallocChecker.cpp:859
+   FunI == II_calloc_dbg)) &&
+   !isStandardNewDelete(FD, C.getASTContext())) {
+  State = CallocMem(C, CE, State);

Same here.



Comment at: llvm/tools/clang/lib/StaticAnalyzer/Checkers/MallocChecker.cpp:866
+   FunI == II_free_dbg)) &&
+   !isStandardNewDelete(FD, C.getASTContext())) {
+  State = FreeMemAux(C, CE, State, 0, false, ReleasedAllocatedMemory);

Same here.



Comment at: llvm/tools/clang/lib/StaticAnalyzer/Checkers/MallocChecker.cpp:874
+   FunI == II_win_tempnam_dbg || FunI == II_wtempnam_dbg)) &&
+   !isStandardNewDelete(FD, C.getASTContext())) {
+  State = MallocUpdateRefState(C, CE, State);

Same here.



Comment at: llvm/tools/clang/lib/StaticAnalyzer/Checkers/MallocChecker.cpp:881
+   FunI == II_win_alloca) &&
+   !isStandardNewDelete(FD, C.getASTContext())) {
+  if (CE->getNumArgs() < 1)

Same here.



Comment at: llvm/tools/clang/lib/StaticAnalyzer/Checkers/MallocChecker.cpp:1183
+
+  //const FunctionDecl *FD = C.getCalleeDecl(CE);
+  //const IdentifierInfo *FI = FD->getIdentifier();

You should remove the commented-out code.



Comment at: llvm/tools/clang/lib/StaticAnalyzer/Checkers/MallocChecker.cpp:1185
+  //const IdentifierInfo *FI = FD->getIdentifier();
+  assert(Att->getModule() != nullptr && "Only C++ operators should have a null"
+"IdentifierInfo. We should not reach "

The explanation in the assert is not correct. This invariant holds because Sema 
guarantees that the module is not null when checking the attribute. See 
`handleOwnershipAttr()` for details.



Comment at: llvm/tools/clang/lib/StaticAnalyzer/Checkers/MallocChecker.cpp:1191
+  (Att->getModule() != II_malloc_dbg) &&
+ !isStandardNewDelete(C.getCalleeDecl(CE), C.getASTContext()))
+return nullptr;

The '!isStandardNewDelete` check doesn't make any sense here. The code is 
dealing with the identifier in specified attribute and not the name of the 
called function.



Comment at: llvm/tools/clang/lib/StaticAnalyzer/Checkers/MallocChecker.cpp:1285
+
+  assert(Att->getModule() != nullptr && "On

[PATCH] D25857: [tsan][clang] Introduce a function attribute to disable TSan checking at run time

2016-11-06 Thread Dmitry Vyukov via cfe-commits
dvyukov added inline comments.



Comment at: test/CodeGen/sanitize-thread-no-checking-at-run-time.m:1
+// RUN: %clang_cc1 -triple x86_64-apple-darwin -x objective-c++ -emit-llvm -o 
- %s | FileCheck -check-prefix=WITHOUT %s
+// RUN: %clang_cc1 -triple x86_64-apple-darwin -x objective-c++ -emit-llvm -o 
- %s -fsanitize=thread | FileCheck -check-prefix=TSAN %s

Are you sure this is the right location for the test?
test/CodeGen does not seem to contain any tests, only subdirs.



Comment at: test/CodeGen/sanitize-thread-no-checking-at-run-time.m:35
+// TSAN: attributes [[ATTR]] = { nounwind {{.*}} 
"sanitize_thread_no_checking_at_run_time" {{.*}} }
+// TSAN-NOT: sanitize_thread

Does this check actually work?
I would expect that sanitize_thread, if present, will be eaten by the previous 
line.
Not sure what's the best way to fix it. What is the exact list of attributes on 
the previous line? Maybe we can just specify them all without using {{.*}}?


https://reviews.llvm.org/D25857



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


[PATCH] D26340: [analyzer] Add SpinLockChecker for the Magenta kernel

2016-11-06 Thread Kareem Khazem via cfe-commits
khazem updated this revision to Diff 77005.
khazem added a comment.

Minor edit, the list of libraries in CMakeLists.txt is now in alphabetical 
order.


https://reviews.llvm.org/D26340

Files:
  include/clang/StaticAnalyzer/Checkers/Checkers.td
  lib/StaticAnalyzer/Checkers/CMakeLists.txt
  lib/StaticAnalyzer/Checkers/SpinLockChecker.cpp
  test/Analysis/spinlock_correct.c
  test/Analysis/spinlock_double_lock.c
  test/Analysis/spinlock_double_release.c

Index: test/Analysis/spinlock_double_release.c
===
--- /dev/null
+++ test/Analysis/spinlock_double_release.c
@@ -0,0 +1,35 @@
+// RUN: %clang_cc1 -analyze -analyzer-checker=magenta.SpinLock -verify %s
+
+typedef unsigned int lock_t;
+
+typedef struct S {
+  int a;
+  lock_t l;
+} S_t;
+
+static S_t st;
+
+void spin_lock(lock_t *lock);
+void spin_unlock(lock_t *lock);
+int bar();
+
+void bar1(lock_t *y) {
+  spin_unlock(y);
+}
+
+void bar2(lock_t *x) {
+  spin_unlock(x); // expected-warning{{Execution path found where spinlock is unlocked twice in a row}}
+}
+
+int foo() {
+  int a = bar();
+  if (a > 0) {
+spin_lock(&st.l);
+bar1(&st.l);
+  }
+
+  lock_t *c = &st.l;
+  bar2(c);
+  return 0;
+}
+
Index: test/Analysis/spinlock_double_lock.c
===
--- /dev/null
+++ test/Analysis/spinlock_double_lock.c
@@ -0,0 +1,20 @@
+// RUN: %clang_cc1 -analyze -analyzer-checker=magenta.SpinLock -verify %s
+
+typedef unsigned int lock_t;
+
+static lock_t l;
+
+void spin_lock(lock_t *lock);
+void spin_unlock(lock_t *lock);
+int bar();
+
+int foo() {
+  int a = bar();
+  if (a > 0)
+spin_lock(&l);
+  if (a > 10)
+spin_lock(&l); // expected-warning{{Execution path found where spinlock is locked twice in a row}}
+
+  return 0;
+}
+
Index: test/Analysis/spinlock_correct.c
===
--- /dev/null
+++ test/Analysis/spinlock_correct.c
@@ -0,0 +1,30 @@
+// RUN: %clang_cc1 -analyze -analyzer-checker=magenta.SpinLock -verify %s
+// expected-no-diagnostics
+
+typedef unsigned int lock_t;
+
+static lock_t l;
+
+void spin_lock(lock_t *lock);
+void spin_unlock(lock_t *lock);
+int bar();
+
+int foo() {
+  int a = bar();
+  if (a > 0) {
+spin_lock(&l);
+  }
+
+  if (a < -10) {
+spin_lock(&l);
+  }
+
+  if (a > 0)
+spin_unlock(&l);
+
+  if (a < -10)
+spin_unlock(&l);
+
+  return 0;
+}
+
Index: lib/StaticAnalyzer/Checkers/SpinLockChecker.cpp
===
--- /dev/null
+++ lib/StaticAnalyzer/Checkers/SpinLockChecker.cpp
@@ -0,0 +1,198 @@
+//== SpinLockChecker.cpp - SpinLock checker -*- C++ -*--==//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===--===//
+//
+// This defines SpinLockChecker, a check for the Magenta kernel. It
+// checks that there are no execution paths where spinlocks are locked
+// twice in a row, or unlocked twice in a row.
+//
+//===--===//
+
+#include "ClangSACheckers.h"
+#include "clang/StaticAnalyzer/Core/BugReporter/BugType.h"
+#include "clang/StaticAnalyzer/Core/CheckerManager.h"
+#include "clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h"
+#include "clang/StaticAnalyzer/Core/PathSensitive/CheckerContext.h"
+#include "llvm/ADT/SmallString.h"
+
+using namespace clang;
+using namespace ento;
+
+namespace {
+
+typedef llvm::SmallString<16> ErrorCategoryStr;
+typedef llvm::SmallString<32> FunctionNameStr;
+
+struct LockInfo {
+
+  enum Kind { Locked, Released } K;
+
+  LockInfo(Kind kind) : K(kind) {}
+
+  bool operator==(const LockInfo &LI) const { return K == LI.K; }
+
+  void Profile(llvm::FoldingSetNodeID &ID) const { ID.AddInteger(K); }
+
+  bool isLocked() const { return K == Locked; }
+
+  bool isReleased() const { return K == Released; }
+
+  static LockInfo getLocked() { return LockInfo(Locked); }
+
+  static LockInfo getReleased() { return LockInfo(Released); }
+
+  static ErrorCategoryStr getLockErrorCategory() { return LockErrCategory; }
+
+  static FunctionNameStr getSpinLockFuncName() { return SpinLockFuncName; }
+
+  static FunctionNameStr getSpinUnlockFuncName() { return SpinUnlockFuncName; }
+
+private:
+  static const ErrorCategoryStr LockErrCategory;
+  static const FunctionNameStr SpinLockFuncName;
+  static const FunctionNameStr SpinUnlockFuncName;
+};
+
+const ErrorCategoryStr LockInfo::LockErrCategory("Lock Error");
+const FunctionNameStr LockInfo::SpinLockFuncName("spin_lock");
+const FunctionNameStr LockInfo::SpinUnlockFuncName("spin_unlock");
+}
+
+/// We keep track of the locks in a map. SpinLockMap maps the
+/// memory region of a spinlock to its status (locked, released).
+/// The re

[PATCH] D26288: Deduplicate replacements by FileEntry instead of file names.

2016-11-06 Thread Eric Liu via cfe-commits
ioeric updated this revision to Diff 77008.
ioeric added a comment.

- Merge with origin/master


https://reviews.llvm.org/D26288

Files:
  include/clang/Tooling/Core/Replacement.h
  lib/Tooling/Core/Replacement.cpp
  lib/Tooling/Refactoring.cpp
  unittests/Tooling/RefactoringTest.cpp

Index: unittests/Tooling/RefactoringTest.cpp
===
--- unittests/Tooling/RefactoringTest.cpp
+++ unittests/Tooling/RefactoringTest.cpp
@@ -19,6 +19,7 @@
 #include "clang/Basic/FileManager.h"
 #include "clang/Basic/LangOptions.h"
 #include "clang/Basic/SourceManager.h"
+#include "clang/Basic/VirtualFileSystem.h"
 #include "clang/Format/Format.h"
 #include "clang/Frontend/CompilerInstance.h"
 #include "clang/Frontend/FrontendAction.h"
@@ -972,40 +973,64 @@
   toReplacements({{"", 0, 3, "cc"}, {"", 3, 3, "dd"}}));
 }
 
-TEST(DeduplicateByFileTest, LeaveLeadingDotDot) {
+TEST(DeduplicateByFileTest, PathsWithDots) {
   std::map FileToReplaces;
+  llvm::IntrusiveRefCntPtr VFS(
+  new vfs::InMemoryFileSystem());
+  FileManager *FileMgr = new FileManager(FileSystemOptions(), VFS);
 #if !defined(LLVM_ON_WIN32)
-  FileToReplaces["../../a/b/.././c.h"] = Replacements();
-  FileToReplaces["../../a/c.h"] = Replacements();
+  StringRef Path1 = "a/b/.././c.h";
+  StringRef Path2 = "a/c.h";
 #else
-  FileToReplaces["..\\..\\a\\b\\..\\.\\c.h"] = Replacements();
-  FileToReplaces["..\\..\\a\\c.h"] = Replacements();
+  StringRef Path1 = "a\\b\\..\\.\\c.h";
+  StringRef Path2 = "a\\c.h";
 #endif
-  FileToReplaces = groupReplacementsByFile(FileToReplaces);
+  EXPECT_TRUE(VFS->addFile(Path1, 0, llvm::MemoryBuffer::getMemBuffer("")));
+  EXPECT_TRUE(VFS->addFile(Path2, 0, llvm::MemoryBuffer::getMemBuffer("")));
+  FileToReplaces[Path1] = Replacements();
+  FileToReplaces[Path2] = Replacements();
+  FileToReplaces = groupReplacementsByFile(*FileMgr, FileToReplaces);
   EXPECT_EQ(1u, FileToReplaces.size());
-#if !defined(LLVM_ON_WIN32)
-  EXPECT_EQ("../../a/c.h", FileToReplaces.begin()->first);
-#else
-  EXPECT_EQ("..\\..\\a\\c.h", FileToReplaces.begin()->first);
-#endif
+  EXPECT_EQ(Path1, FileToReplaces.begin()->first);
 }
 
-TEST(DeduplicateByFileTest, RemoveDotSlash) {
+TEST(DeduplicateByFileTest, PathWithDotSlash) {
   std::map FileToReplaces;
+  llvm::IntrusiveRefCntPtr VFS(
+  new vfs::InMemoryFileSystem());
+  FileManager *FileMgr = new FileManager(FileSystemOptions(), VFS);
 #if !defined(LLVM_ON_WIN32)
-  FileToReplaces["./a/b/.././c.h"] = Replacements();
-  FileToReplaces["a/c.h"] = Replacements();
+  StringRef Path1 = "./a/b/c.h";
+  StringRef Path2 = "a/b/c.h";
 #else
-  FileToReplaces[".\\a\\b\\..\\.\\c.h"] = Replacements();
-  FileToReplaces["a\\c.h"] = Replacements();
+  StringRef Path1 = ".\\a\\b\\c.h";
+  StringRef Path2 = "a\\b\\c.h";
 #endif
-  FileToReplaces = groupReplacementsByFile(FileToReplaces);
+  EXPECT_TRUE(VFS->addFile(Path1, 0, llvm::MemoryBuffer::getMemBuffer("")));
+  EXPECT_TRUE(VFS->addFile(Path2, 0, llvm::MemoryBuffer::getMemBuffer("")));
+  FileToReplaces[Path1] = Replacements();
+  FileToReplaces[Path2] = Replacements();
+  FileToReplaces = groupReplacementsByFile(*FileMgr, FileToReplaces);
   EXPECT_EQ(1u, FileToReplaces.size());
+  EXPECT_EQ(Path1, FileToReplaces.begin()->first);
+}
+
+TEST(DeduplicateByFileTest, NonExistingFilePath) {
+  std::map FileToReplaces;
+  llvm::IntrusiveRefCntPtr VFS(
+  new vfs::InMemoryFileSystem());
+  FileManager *FileMgr = new FileManager(FileSystemOptions(), VFS);
 #if !defined(LLVM_ON_WIN32)
-  EXPECT_EQ("a/c.h", FileToReplaces.begin()->first);
+  StringRef Path1 = "./a/b/c.h";
+  StringRef Path2 = "a/b/c.h";
 #else
-  EXPECT_EQ("a\\c.h", FileToReplaces.begin()->first);
+  StringRef Path1 = ".\\a\\b\\c.h";
+  StringRef Path2 = "a\\b\\c.h";
 #endif
+  FileToReplaces[Path1] = Replacements();
+  FileToReplaces[Path2] = Replacements();
+  FileToReplaces = groupReplacementsByFile(*FileMgr, FileToReplaces);
+  EXPECT_TRUE(FileToReplaces.empty());
 }
 
 } // end namespace tooling
Index: lib/Tooling/Refactoring.cpp
===
--- lib/Tooling/Refactoring.cpp
+++ lib/Tooling/Refactoring.cpp
@@ -57,7 +57,8 @@
 
 bool RefactoringTool::applyAllReplacements(Rewriter &Rewrite) {
   bool Result = true;
-  for (const auto &Entry : groupReplacementsByFile(FileToReplaces))
+  for (const auto &Entry : groupReplacementsByFile(
+   Rewrite.getSourceMgr().getFileManager(), FileToReplaces))
 Result = tooling::applyAllReplacements(Entry.second, Rewrite) && Result;
   return Result;
 }
@@ -73,7 +74,8 @@
   FileManager &Files = SM.getFileManager();
 
   bool Result = true;
-  for (const auto &FileAndReplaces : groupReplacementsByFile(FileToReplaces)) {
+  for (const auto &FileAndReplaces : groupReplacementsByFile(
+   Rewrite.getSourceMgr().getFileManager(), FileToReplaces)) {
 const std::string &FilePath = FileAndReplaces.first;
 auto &CurRepl

r286096 - Deduplicate replacements by FileEntry instead of file names.

2016-11-06 Thread Eric Liu via cfe-commits
Author: ioeric
Date: Mon Nov  7 00:08:23 2016
New Revision: 286096

URL: http://llvm.org/viewvc/llvm-project?rev=286096&view=rev
Log:
Deduplicate replacements by FileEntry instead of file names.

Summary:
The current version does not deduplicate equivalent file paths correctly.
For example, a relative path and an absolute path are considered inequivalent.
Comparing FileEnry addresses these issues.

Reviewers: djasper

Subscribers: alexshap, klimek, cfe-commits

Differential Revision: https://reviews.llvm.org/D26288

Modified:
cfe/trunk/include/clang/Tooling/Core/Replacement.h
cfe/trunk/lib/Tooling/Core/Replacement.cpp
cfe/trunk/lib/Tooling/Refactoring.cpp
cfe/trunk/unittests/Tooling/RefactoringTest.cpp

Modified: cfe/trunk/include/clang/Tooling/Core/Replacement.h
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Tooling/Core/Replacement.h?rev=286096&r1=286095&r2=286096&view=diff
==
--- cfe/trunk/include/clang/Tooling/Core/Replacement.h (original)
+++ cfe/trunk/include/clang/Tooling/Core/Replacement.h Mon Nov  7 00:08:23 2016
@@ -19,6 +19,7 @@
 #ifndef LLVM_CLANG_TOOLING_CORE_REPLACEMENT_H
 #define LLVM_CLANG_TOOLING_CORE_REPLACEMENT_H
 
+#include "clang/Basic/FileManager.h"
 #include "clang/Basic/LangOptions.h"
 #include "clang/Basic/SourceLocation.h"
 #include "llvm/ADT/StringRef.h"
@@ -293,9 +294,10 @@ calculateRangesAfterReplacements(const R
  const std::vector &Ranges);
 
 /// \brief If there are multiple  pairs with the same file
-/// path after removing dots, we only keep one pair (with path after dots being
-/// removed) and discard the rest.
+/// entry, we only keep one pair and discard the rest.
+/// If a file does not exist, its corresponding replacements will be ignored.
 std::map groupReplacementsByFile(
+FileManager &FileMgr,
 const std::map &FileToReplaces);
 
 template 

Modified: cfe/trunk/lib/Tooling/Core/Replacement.cpp
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Tooling/Core/Replacement.cpp?rev=286096&r1=286095&r2=286096&view=diff
==
--- cfe/trunk/lib/Tooling/Core/Replacement.cpp (original)
+++ cfe/trunk/lib/Tooling/Core/Replacement.cpp Mon Nov  7 00:08:23 2016
@@ -20,6 +20,7 @@
 #include "clang/Basic/SourceManager.h"
 #include "clang/Lex/Lexer.h"
 #include "clang/Rewrite/Core/Rewriter.h"
+#include "llvm/ADT/SmallPtrSet.h"
 #include "llvm/Support/FileSystem.h"
 #include "llvm/Support/Path.h"
 #include "llvm/Support/raw_os_ostream.h"
@@ -566,12 +567,16 @@ llvm::Expected applyAllRepl
 }
 
 std::map groupReplacementsByFile(
+FileManager &FileMgr,
 const std::map &FileToReplaces) {
   std::map Result;
+  llvm::SmallPtrSet ProcessedFileEntries;
   for (const auto &Entry : FileToReplaces) {
-llvm::SmallString<256> CleanPath(Entry.first);
-llvm::sys::path::remove_dots(CleanPath, /*remove_dot_dot=*/true);
-Result[CleanPath.str()] = std::move(Entry.second);
+const FileEntry *FE = FileMgr.getFile(Entry.first);
+if (!FE)
+  llvm::errs() << "File path " << Entry.first << " is invalid.\n";
+else if (ProcessedFileEntries.insert(FE).second)
+  Result[Entry.first] = std::move(Entry.second);
   }
   return Result;
 }

Modified: cfe/trunk/lib/Tooling/Refactoring.cpp
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Tooling/Refactoring.cpp?rev=286096&r1=286095&r2=286096&view=diff
==
--- cfe/trunk/lib/Tooling/Refactoring.cpp (original)
+++ cfe/trunk/lib/Tooling/Refactoring.cpp Mon Nov  7 00:08:23 2016
@@ -57,7 +57,8 @@ int RefactoringTool::runAndSave(Frontend
 
 bool RefactoringTool::applyAllReplacements(Rewriter &Rewrite) {
   bool Result = true;
-  for (const auto &Entry : groupReplacementsByFile(FileToReplaces))
+  for (const auto &Entry : groupReplacementsByFile(
+   Rewrite.getSourceMgr().getFileManager(), FileToReplaces))
 Result = tooling::applyAllReplacements(Entry.second, Rewrite) && Result;
   return Result;
 }
@@ -73,7 +74,8 @@ bool formatAndApplyAllReplacements(
   FileManager &Files = SM.getFileManager();
 
   bool Result = true;
-  for (const auto &FileAndReplaces : groupReplacementsByFile(FileToReplaces)) {
+  for (const auto &FileAndReplaces : groupReplacementsByFile(
+   Rewrite.getSourceMgr().getFileManager(), FileToReplaces)) {
 const std::string &FilePath = FileAndReplaces.first;
 auto &CurReplaces = FileAndReplaces.second;
 

Modified: cfe/trunk/unittests/Tooling/RefactoringTest.cpp
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/unittests/Tooling/RefactoringTest.cpp?rev=286096&r1=286095&r2=286096&view=diff
==
--- cfe/trunk/unittests/Tooling/RefactoringTest.cpp (original)
+++ cfe/trunk/unittests/Tooling/RefactoringTest.cpp Mon No

[PATCH] D26288: Deduplicate replacements by FileEntry instead of file names.

2016-11-06 Thread Eric Liu via cfe-commits
This revision was automatically updated to reflect the committed changes.
Closed by commit rL286096: Deduplicate replacements by FileEntry instead of 
file names. (authored by ioeric).

Changed prior to commit:
  https://reviews.llvm.org/D26288?vs=77008&id=77009#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D26288

Files:
  cfe/trunk/include/clang/Tooling/Core/Replacement.h
  cfe/trunk/lib/Tooling/Core/Replacement.cpp
  cfe/trunk/lib/Tooling/Refactoring.cpp
  cfe/trunk/unittests/Tooling/RefactoringTest.cpp

Index: cfe/trunk/include/clang/Tooling/Core/Replacement.h
===
--- cfe/trunk/include/clang/Tooling/Core/Replacement.h
+++ cfe/trunk/include/clang/Tooling/Core/Replacement.h
@@ -19,6 +19,7 @@
 #ifndef LLVM_CLANG_TOOLING_CORE_REPLACEMENT_H
 #define LLVM_CLANG_TOOLING_CORE_REPLACEMENT_H
 
+#include "clang/Basic/FileManager.h"
 #include "clang/Basic/LangOptions.h"
 #include "clang/Basic/SourceLocation.h"
 #include "llvm/ADT/StringRef.h"
@@ -293,9 +294,10 @@
  const std::vector &Ranges);
 
 /// \brief If there are multiple  pairs with the same file
-/// path after removing dots, we only keep one pair (with path after dots being
-/// removed) and discard the rest.
+/// entry, we only keep one pair and discard the rest.
+/// If a file does not exist, its corresponding replacements will be ignored.
 std::map groupReplacementsByFile(
+FileManager &FileMgr,
 const std::map &FileToReplaces);
 
 template 
Index: cfe/trunk/lib/Tooling/Refactoring.cpp
===
--- cfe/trunk/lib/Tooling/Refactoring.cpp
+++ cfe/trunk/lib/Tooling/Refactoring.cpp
@@ -57,7 +57,8 @@
 
 bool RefactoringTool::applyAllReplacements(Rewriter &Rewrite) {
   bool Result = true;
-  for (const auto &Entry : groupReplacementsByFile(FileToReplaces))
+  for (const auto &Entry : groupReplacementsByFile(
+   Rewrite.getSourceMgr().getFileManager(), FileToReplaces))
 Result = tooling::applyAllReplacements(Entry.second, Rewrite) && Result;
   return Result;
 }
@@ -73,7 +74,8 @@
   FileManager &Files = SM.getFileManager();
 
   bool Result = true;
-  for (const auto &FileAndReplaces : groupReplacementsByFile(FileToReplaces)) {
+  for (const auto &FileAndReplaces : groupReplacementsByFile(
+   Rewrite.getSourceMgr().getFileManager(), FileToReplaces)) {
 const std::string &FilePath = FileAndReplaces.first;
 auto &CurReplaces = FileAndReplaces.second;
 
Index: cfe/trunk/lib/Tooling/Core/Replacement.cpp
===
--- cfe/trunk/lib/Tooling/Core/Replacement.cpp
+++ cfe/trunk/lib/Tooling/Core/Replacement.cpp
@@ -20,6 +20,7 @@
 #include "clang/Basic/SourceManager.h"
 #include "clang/Lex/Lexer.h"
 #include "clang/Rewrite/Core/Rewriter.h"
+#include "llvm/ADT/SmallPtrSet.h"
 #include "llvm/Support/FileSystem.h"
 #include "llvm/Support/Path.h"
 #include "llvm/Support/raw_os_ostream.h"
@@ -566,12 +567,16 @@
 }
 
 std::map groupReplacementsByFile(
+FileManager &FileMgr,
 const std::map &FileToReplaces) {
   std::map Result;
+  llvm::SmallPtrSet ProcessedFileEntries;
   for (const auto &Entry : FileToReplaces) {
-llvm::SmallString<256> CleanPath(Entry.first);
-llvm::sys::path::remove_dots(CleanPath, /*remove_dot_dot=*/true);
-Result[CleanPath.str()] = std::move(Entry.second);
+const FileEntry *FE = FileMgr.getFile(Entry.first);
+if (!FE)
+  llvm::errs() << "File path " << Entry.first << " is invalid.\n";
+else if (ProcessedFileEntries.insert(FE).second)
+  Result[Entry.first] = std::move(Entry.second);
   }
   return Result;
 }
Index: cfe/trunk/unittests/Tooling/RefactoringTest.cpp
===
--- cfe/trunk/unittests/Tooling/RefactoringTest.cpp
+++ cfe/trunk/unittests/Tooling/RefactoringTest.cpp
@@ -19,6 +19,7 @@
 #include "clang/Basic/FileManager.h"
 #include "clang/Basic/LangOptions.h"
 #include "clang/Basic/SourceManager.h"
+#include "clang/Basic/VirtualFileSystem.h"
 #include "clang/Format/Format.h"
 #include "clang/Frontend/CompilerInstance.h"
 #include "clang/Frontend/FrontendAction.h"
@@ -972,40 +973,64 @@
   toReplacements({{"", 0, 3, "cc"}, {"", 3, 3, "dd"}}));
 }
 
-TEST(DeduplicateByFileTest, LeaveLeadingDotDot) {
+TEST(DeduplicateByFileTest, PathsWithDots) {
   std::map FileToReplaces;
+  llvm::IntrusiveRefCntPtr VFS(
+  new vfs::InMemoryFileSystem());
+  FileManager *FileMgr = new FileManager(FileSystemOptions(), VFS);
 #if !defined(LLVM_ON_WIN32)
-  FileToReplaces["../../a/b/.././c.h"] = Replacements();
-  FileToReplaces["../../a/c.h"] = Replacements();
+  StringRef Path1 = "a/b/.././c.h";
+  StringRef Path2 = "a/c.h";
 #else
-  FileToReplaces["..\\..\\a\\b\\..\\.\\c.h"] = Replacements();
-  FileToReplaces["..\\..\\a\\c.h"] = Replacements();
+  StringRef Path1 = "a\\b\\..\\.\\c.h";
+  StringRef Path2 = "a

[PATCH] D21298: [Clang-tidy] delete null check

2016-11-06 Thread Alexander Kornienko via cfe-commits
alexfh added a comment.

I guess, "readability" will be a better category for this check.


https://reviews.llvm.org/D21298



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


r286097 - [AVX-512][Sema] Add more intrinsics to the checks for valid immediates for embedded rounding control arguments.

2016-11-06 Thread Craig Topper via cfe-commits
Author: ctopper
Date: Mon Nov  7 01:01:09 2016
New Revision: 286097

URL: http://llvm.org/viewvc/llvm-project?rev=286097&view=rev
Log:
[AVX-512][Sema] Add more intrinsics to the checks for valid immediates for 
embedded rounding control arguments.

Modified:
cfe/trunk/lib/Sema/SemaChecking.cpp

Modified: cfe/trunk/lib/Sema/SemaChecking.cpp
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaChecking.cpp?rev=286097&r1=286096&r2=286097&view=diff
==
--- cfe/trunk/lib/Sema/SemaChecking.cpp (original)
+++ cfe/trunk/lib/Sema/SemaChecking.cpp Mon Nov  7 01:01:09 2016
@@ -1814,8 +1814,17 @@ bool Sema::CheckX86BuiltinRoundingOrSAE(
   case X86::BI__builtin_ia32_cmpps512_mask:
   case X86::BI__builtin_ia32_cmpsd_mask:
   case X86::BI__builtin_ia32_cmpss_mask:
+  case X86::BI__builtin_ia32_cvtss2sd_round_mask:
   case X86::BI__builtin_ia32_getexpsd128_round_mask:
   case X86::BI__builtin_ia32_getexpss128_round_mask:
+  case X86::BI__builtin_ia32_maxpd512_mask:
+  case X86::BI__builtin_ia32_maxps512_mask:
+  case X86::BI__builtin_ia32_maxsd_round_mask:
+  case X86::BI__builtin_ia32_maxss_round_mask:
+  case X86::BI__builtin_ia32_minpd512_mask:
+  case X86::BI__builtin_ia32_minps512_mask:
+  case X86::BI__builtin_ia32_minsd_round_mask:
+  case X86::BI__builtin_ia32_minss_round_mask:
   case X86::BI__builtin_ia32_rcp28sd_round_mask:
   case X86::BI__builtin_ia32_rcp28ss_round_mask:
   case X86::BI__builtin_ia32_reducepd512_mask:
@@ -1855,6 +1864,9 @@ bool Sema::CheckX86BuiltinRoundingOrSAE(
 ArgNum = 1;
 HasRC = true;
 break;
+  case X86::BI__builtin_ia32_cvtsi2sd64:
+  case X86::BI__builtin_ia32_cvtsi2ss32:
+  case X86::BI__builtin_ia32_cvtsi2ss64:
   case X86::BI__builtin_ia32_cvtusi2sd64:
   case X86::BI__builtin_ia32_cvtusi2ss32:
   case X86::BI__builtin_ia32_cvtusi2ss64:
@@ -1872,6 +1884,8 @@ bool Sema::CheckX86BuiltinRoundingOrSAE(
   case X86::BI__builtin_ia32_cvtqq2ps512_mask:
   case X86::BI__builtin_ia32_cvtuqq2pd512_mask:
   case X86::BI__builtin_ia32_cvtuqq2ps512_mask:
+  case X86::BI__builtin_ia32_sqrtpd512_mask:
+  case X86::BI__builtin_ia32_sqrtps512_mask:
 ArgNum = 3;
 HasRC = true;
 break;
@@ -1897,6 +1911,9 @@ bool Sema::CheckX86BuiltinRoundingOrSAE(
   case X86::BI__builtin_ia32_scalefss_round_mask:
   case X86::BI__builtin_ia32_getmantpd512_mask:
   case X86::BI__builtin_ia32_getmantps512_mask:
+  case X86::BI__builtin_ia32_cvtsd2ss_round_mask:
+  case X86::BI__builtin_ia32_sqrtsd_round_mask:
+  case X86::BI__builtin_ia32_sqrtss_round_mask:
   case X86::BI__builtin_ia32_vfmaddpd512_mask:
   case X86::BI__builtin_ia32_vfmaddpd512_mask3:
   case X86::BI__builtin_ia32_vfmaddpd512_maskz:


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