<div dir="ltr"><div dir="ltr">Hello Kristof,<br><br>It looks like this commit added broken tests to couple of our builders:<br><br><a href="http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-windows10pro-fast">http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-windows10pro-fast</a><br><a href="http://lab.llvm.org:8011/builders/llvm-clang-x86_64-expensive-checks-win">http://lab.llvm.org:8011/builders/llvm-clang-x86_64-expensive-checks-win</a><br>. . . <br> Clang :: Analysis/analyzer-list-configs.c</div><div dir="ltr"><br></div><div dir="ltr">Please have a look?<br>The builders were already red and did not send any notifications.<br><br>Please have a look?<br><br>Thanks<br><br>Galina<br></div></div><br><div class="gmail_quote"><div dir="ltr">On Fri, Nov 2, 2018 at 9:04 AM Kristof Umann via cfe-commits <<a href="mailto:cfe-commits@lists.llvm.org">cfe-commits@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: szelethus<br>
Date: Fri Nov 2 09:02:10 2018<br>
New Revision: 345990<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=345990&view=rev" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project?rev=345990&view=rev</a><br>
Log:<br>
[analyzer] Put llvm.Conventions back in alpha<br>
<br>
Interestingly, this many year old (when I last looked I remember 2010ish)<br>
checker was committed without any tests, so I thought I'd implement them, but I<br>
was shocked to see how I barely managed to get it working. The code is severely<br>
outdated, I'm not even sure it has ever been used, so I'd propose to move it<br>
back into alpha, and possibly even remove it.<br>
<br>
Differential Revision: <a href="https://reviews.llvm.org/D53856" rel="noreferrer" target="_blank">https://reviews.llvm.org/D53856</a><br>
<br>
Added:<br>
cfe/trunk/test/Analysis/llvm-conventions.cpp<br>
Modified:<br>
cfe/trunk/include/clang/StaticAnalyzer/Checkers/Checkers.td<br>
cfe/trunk/lib/StaticAnalyzer/Checkers/LLVMConventionsChecker.cpp<br>
cfe/trunk/test/Analysis/Inputs/system-header-simulator-cxx.h<br>
cfe/trunk/test/Analysis/diagnostics/explicit-suppression.cpp<br>
cfe/trunk/test/Analysis/inner-pointer.cpp<br>
cfe/trunk/test/Analysis/temporaries.cpp<br>
cfe/trunk/www/analyzer/alpha_checks.html<br>
<br>
Modified: cfe/trunk/include/clang/StaticAnalyzer/Checkers/Checkers.td<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/StaticAnalyzer/Checkers/Checkers.td?rev=345990&r1=345989&r2=345990&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/StaticAnalyzer/Checkers/Checkers.td?rev=345990&r1=345989&r2=345990&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/include/clang/StaticAnalyzer/Checkers/Checkers.td (original)<br>
+++ cfe/trunk/include/clang/StaticAnalyzer/Checkers/Checkers.td Fri Nov 2 09:02:10 2018<br>
@@ -83,6 +83,7 @@ def LocalizabilityOptIn : Package<"local<br>
def MPI : Package<"mpi">, InPackage<OptIn>;<br>
<br>
def LLVM : Package<"llvm">;<br>
+def LLVMAlpha : Package<"llvm">, InPackage<Alpha>, Hidden;<br>
<br>
// The APIModeling package is for checkers that model APIs and don't perform<br>
// any diagnostics. These checkers are always turned on; this package is<br>
@@ -730,7 +731,7 @@ let ParentPackage = MPI in {<br>
//===----------------------------------------------------------------------===//<br>
<br>
def LLVMConventionsChecker : Checker<"Conventions">,<br>
- InPackage<LLVM>,<br>
+ InPackage<LLVMAlpha>,<br>
HelpText<"Check code for LLVM codebase conventions">,<br>
DescFile<"LLVMConventionsChecker.cpp">;<br>
<br>
<br>
Modified: cfe/trunk/lib/StaticAnalyzer/Checkers/LLVMConventionsChecker.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Checkers/LLVMConventionsChecker.cpp?rev=345990&r1=345989&r2=345990&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Checkers/LLVMConventionsChecker.cpp?rev=345990&r1=345989&r2=345990&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/lib/StaticAnalyzer/Checkers/LLVMConventionsChecker.cpp (original)<br>
+++ cfe/trunk/lib/StaticAnalyzer/Checkers/LLVMConventionsChecker.cpp Fri Nov 2 09:02:10 2018<br>
@@ -32,8 +32,7 @@ static bool IsLLVMStringRef(QualType T)<br>
if (!RT)<br>
return false;<br>
<br>
- return StringRef(QualType(RT, 0).getAsString()) ==<br>
- "class StringRef";<br>
+ return StringRef(QualType(RT, 0).getAsString()) == "class StringRef";<br>
}<br>
<br>
/// Check whether the declaration is semantically inside the top-level<br>
<br>
Modified: cfe/trunk/test/Analysis/Inputs/system-header-simulator-cxx.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Analysis/Inputs/system-header-simulator-cxx.h?rev=345990&r1=345989&r2=345990&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Analysis/Inputs/system-header-simulator-cxx.h?rev=345990&r1=345989&r2=345990&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/test/Analysis/Inputs/system-header-simulator-cxx.h (original)<br>
+++ cfe/trunk/test/Analysis/Inputs/system-header-simulator-cxx.h Fri Nov 2 09:02:10 2018<br>
@@ -12,6 +12,13 @@ typedef __typeof__((char*)0-(char*)0) pt<br>
void *memmove(void *s1, const void *s2, size_t n);<br>
<br>
namespace std {<br>
+ typedef size_t size_type;<br>
+#if __cplusplus >= 201103L<br>
+ using nullptr_t = decltype(nullptr);<br>
+#endif<br>
+}<br>
+<br>
+namespace std {<br>
struct input_iterator_tag { };<br>
struct output_iterator_tag { };<br>
struct forward_iterator_tag : public input_iterator_tag { };<br>
@@ -517,6 +524,42 @@ namespace std {<br>
const T& front() const { return *begin(); }<br>
};<br>
<br>
+ template <typename CharT><br>
+ class basic_string {<br>
+ public:<br>
+ basic_string();<br>
+ basic_string(const CharT *s);<br>
+<br>
+ ~basic_string();<br>
+ void clear();<br>
+<br>
+ basic_string &operator=(const basic_string &str);<br>
+ basic_string &operator+=(const basic_string &str);<br>
+<br>
+ const CharT *c_str() const;<br>
+ const CharT *data() const;<br>
+ CharT *data();<br>
+<br>
+ basic_string &append(size_type count, CharT ch);<br>
+ basic_string &assign(size_type count, CharT ch);<br>
+ basic_string &erase(size_type index, size_type count);<br>
+ basic_string &insert(size_type index, size_type count, CharT ch);<br>
+ basic_string &replace(size_type pos, size_type count, const basic_string &str);<br>
+ void pop_back();<br>
+ void push_back(CharT ch);<br>
+ void reserve(size_type new_cap);<br>
+ void resize(size_type count);<br>
+ void shrink_to_fit();<br>
+ void swap(basic_string &other);<br>
+ };<br>
+<br>
+ typedef basic_string<char> string;<br>
+ typedef basic_string<wchar_t> wstring;<br>
+#if __cplusplus >= 201103L<br>
+ typedef basic_string<char16_t> u16string;<br>
+ typedef basic_string<char32_t> u32string;<br>
+#endif<br>
+<br>
class exception {<br>
public:<br>
exception() throw();<br>
<br>
Modified: cfe/trunk/test/Analysis/diagnostics/explicit-suppression.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Analysis/diagnostics/explicit-suppression.cpp?rev=345990&r1=345989&r2=345990&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Analysis/diagnostics/explicit-suppression.cpp?rev=345990&r1=345989&r2=345990&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/test/Analysis/diagnostics/explicit-suppression.cpp (original)<br>
+++ cfe/trunk/test/Analysis/diagnostics/explicit-suppression.cpp Fri Nov 2 09:02:10 2018<br>
@@ -19,6 +19,6 @@ class C {<br>
void testCopyNull(C *I, C *E) {<br>
std::copy(I, E, (C *)0);<br>
#ifndef SUPPRESSED<br>
- // expected-warning@../Inputs/system-header-simulator-cxx.h:627 {{Called C++ object pointer is null}}<br>
+ // expected-warning@../Inputs/system-header-simulator-cxx.h:668 {{Called C++ object pointer is null}}<br>
#endif<br>
}<br>
<br>
Modified: cfe/trunk/test/Analysis/inner-pointer.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Analysis/inner-pointer.cpp?rev=345990&r1=345989&r2=345990&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Analysis/inner-pointer.cpp?rev=345990&r1=345989&r2=345990&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/test/Analysis/inner-pointer.cpp (original)<br>
+++ cfe/trunk/test/Analysis/inner-pointer.cpp Fri Nov 2 09:02:10 2018<br>
@@ -1,43 +1,9 @@<br>
-//RUN: %clang_analyze_cc1 -analyzer-checker=cplusplus.InnerPointer %s -analyzer-output=text -verify<br>
+// RUN: %clang_analyze_cc1 -analyzer-checker=cplusplus.InnerPointer \<br>
+// RUN: %s -analyzer-output=text -verify<br>
<br>
+#include "Inputs/system-header-simulator-cxx.h"<br>
namespace std {<br>
<br>
-typedef int size_type;<br>
-<br>
-template <typename CharT><br>
-class basic_string {<br>
-public:<br>
- basic_string();<br>
- basic_string(const CharT *s);<br>
-<br>
- ~basic_string();<br>
- void clear();<br>
-<br>
- basic_string &operator=(const basic_string &str);<br>
- basic_string &operator+=(const basic_string &str);<br>
-<br>
- const CharT *c_str() const;<br>
- const CharT *data() const;<br>
- CharT *data();<br>
-<br>
- basic_string &append(size_type count, CharT ch);<br>
- basic_string &assign(size_type count, CharT ch);<br>
- basic_string &erase(size_type index, size_type count);<br>
- basic_string &insert(size_type index, size_type count, CharT ch);<br>
- basic_string &replace(size_type pos, size_type count, const basic_string &str);<br>
- void pop_back();<br>
- void push_back(CharT ch);<br>
- void reserve(size_type new_cap);<br>
- void resize(size_type count);<br>
- void shrink_to_fit();<br>
- void swap(basic_string &other);<br>
-};<br>
-<br>
-typedef basic_string<char> string;<br>
-typedef basic_string<wchar_t> wstring;<br>
-typedef basic_string<char16_t> u16string;<br>
-typedef basic_string<char32_t> u32string;<br>
-<br>
template <typename T><br>
void func_ref(T &a);<br>
<br>
<br>
Added: cfe/trunk/test/Analysis/llvm-conventions.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Analysis/llvm-conventions.cpp?rev=345990&view=auto" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Analysis/llvm-conventions.cpp?rev=345990&view=auto</a><br>
==============================================================================<br>
--- cfe/trunk/test/Analysis/llvm-conventions.cpp (added)<br>
+++ cfe/trunk/test/Analysis/llvm-conventions.cpp Fri Nov 2 09:02:10 2018<br>
@@ -0,0 +1,226 @@<br>
+// RUN: %clang_analyze_cc1 -analyzer-checker=core,alpha.llvm.Conventions \<br>
+// RUN: -std=c++14 -verify %s<br>
+<br>
+#include "Inputs/system-header-simulator-cxx.h"<br>
+<br>
+//===----------------------------------------------------------------------===//<br>
+// Forward declarations for StringRef tests.<br>
+//===----------------------------------------------------------------------===//<br>
+<br>
+using size_t = unsigned long;<br>
+using size_type = size_t;<br>
+<br>
+namespace std {<br>
+<br>
+template <class T><br>
+struct numeric_limits { const static bool is_signed; };<br>
+<br>
+} // end of namespace std<br>
+<br>
+namespace llvm {<br>
+<br>
+template <class T><br>
+struct iterator_range;<br>
+<br>
+template <class Func><br>
+struct function_ref;<br>
+<br>
+struct hash_code;<br>
+<br>
+template <class T><br>
+struct SmallVectorImpl;<br>
+<br>
+struct APInt;<br>
+<br>
+class StringRef {<br>
+public:<br>
+ static const size_t npos = ~size_t(0);<br>
+ using iterator = const char *;<br>
+ using const_iterator = const char *;<br>
+ using size_type = size_t;<br>
+<br>
+ /*implicit*/ StringRef() = default;<br>
+ StringRef(std::nullptr_t) = delete;<br>
+ /*implicit*/ StringRef(const char *Str);<br>
+ /*implicit*/ constexpr StringRef(const char *data, size_t length);<br>
+ /*implicit*/ StringRef(const std::string &Str);<br>
+<br>
+ static StringRef withNullAsEmpty(const char *data);<br>
+ iterator begin() const;<br>
+ iterator end() const;<br>
+ const unsigned char *bytes_begin() const;<br>
+ const unsigned char *bytes_end() const;<br>
+ iterator_range<const unsigned char *> bytes() const;<br>
+ const char *data() const;<br>
+ bool empty() const;<br>
+ size_t size() const;<br>
+ char front() const;<br>
+ char back() const;<br>
+ template <typename Allocator><br>
+ StringRef copy(Allocator &A) const;<br>
+ bool equals(StringRef RHS) const;<br>
+ bool equals_lower(StringRef RHS) const;<br>
+ int compare(StringRef RHS) const;<br>
+ int compare_lower(StringRef RHS) const;<br>
+ int compare_numeric(StringRef RHS) const;<br>
+ unsigned edit_distance(StringRef Other, bool AllowReplacements = true,<br>
+ unsigned MaxEditDistance = 0) const;<br>
+ std::string str() const;<br>
+ char operator[](size_t Index) const;<br>
+ template <typename T><br>
+ typename std::enable_if<std::is_same<T, std::string>::value,<br>
+ StringRef>::type &<br>
+ operator=(T &&Str) = delete;<br>
+ operator std::string() const;<br>
+ bool startswith(StringRef Prefix) const;<br>
+ bool startswith_lower(StringRef Prefix) const;<br>
+ bool endswith(StringRef Suffix) const;<br>
+ bool endswith_lower(StringRef Suffix) const;<br>
+ size_t find(char C, size_t From = 0) const;<br>
+ size_t find_lower(char C, size_t From = 0) const;<br>
+ size_t find_if(function_ref<bool(char)> F, size_t From = 0) const;<br>
+ size_t find_if_not(function_ref<bool(char)> F, size_t From = 0) const;<br>
+ size_t find(StringRef Str, size_t From = 0) const;<br>
+ size_t find_lower(StringRef Str, size_t From = 0) const;<br>
+ size_t rfind(char C, size_t From = npos) const;<br>
+ size_t rfind_lower(char C, size_t From = npos) const;<br>
+ size_t rfind(StringRef Str) const;<br>
+ size_t rfind_lower(StringRef Str) const;<br>
+ size_t find_first_of(char C, size_t From = 0) const;<br>
+ size_t find_first_of(StringRef Chars, size_t From = 0) const;<br>
+ size_t find_first_not_of(char C, size_t From = 0) const;<br>
+ size_t find_first_not_of(StringRef Chars, size_t From = 0) const;<br>
+ size_t find_last_of(char C, size_t From = npos) const;<br>
+ size_t find_last_of(StringRef Chars, size_t From = npos) const;<br>
+ size_t find_last_not_of(char C, size_t From = npos) const;<br>
+ size_t find_last_not_of(StringRef Chars, size_t From = npos) const;<br>
+ bool contains(StringRef Other) const;<br>
+ bool contains(char C) const;<br>
+ bool contains_lower(StringRef Other) const;<br>
+ bool contains_lower(char C) const;<br>
+ size_t count(char C) const;<br>
+ size_t count(StringRef Str) const;<br>
+ template <typename T><br>
+ typename std::enable_if<std::numeric_limits<T>::is_signed, bool>::type<br>
+ getAsInteger(unsigned Radix, T &Result) const;<br>
+ template <typename T><br>
+ typename std::enable_if<!std::numeric_limits<T>::is_signed, bool>::type<br>
+ getAsInteger(unsigned Radix, T &Result) const;<br>
+ template <typename T><br>
+ typename std::enable_if<std::numeric_limits<T>::is_signed, bool>::type<br>
+ consumeInteger(unsigned Radix, T &Result);<br>
+ template <typename T><br>
+ typename std::enable_if<!std::numeric_limits<T>::is_signed, bool>::type<br>
+ consumeInteger(unsigned Radix, T &Result);<br>
+ bool getAsInteger(unsigned Radix, APInt &Result) const;<br>
+ bool getAsDouble(double &Result, bool AllowInexact = true) const;<br>
+ std::string lower() const;<br>
+ std::string upper() const;<br>
+ StringRef substr(size_t Start, size_t N = npos) const;<br>
+ StringRef take_front(size_t N = 1) const;<br>
+ StringRef take_back(size_t N = 1) const;<br>
+ StringRef take_while(function_ref<bool(char)> F) const;<br>
+ StringRef take_until(function_ref<bool(char)> F) const;<br>
+ StringRef drop_front(size_t N = 1) const;<br>
+ StringRef drop_back(size_t N = 1) const;<br>
+ StringRef drop_while(function_ref<bool(char)> F) const;<br>
+ StringRef drop_until(function_ref<bool(char)> F) const;<br>
+ bool consume_front(StringRef Prefix);<br>
+ bool consume_back(StringRef Suffix);<br>
+ StringRef slice(size_t Start, size_t End) const;<br>
+ std::pair<StringRef, StringRef> split(char Separator) const;<br>
+ std::pair<StringRef, StringRef> split(StringRef Separator) const;<br>
+ std::pair<StringRef, StringRef> rsplit(StringRef Separator) const;<br>
+ void split(SmallVectorImpl<StringRef> &A,<br>
+ StringRef Separator, int MaxSplit = -1,<br>
+ bool KeepEmpty = true) const;<br>
+ void split(SmallVectorImpl<StringRef> &A, char Separator, int MaxSplit = -1,<br>
+ bool KeepEmpty = true) const;<br>
+ std::pair<StringRef, StringRef> rsplit(char Separator) const;<br>
+ StringRef ltrim(char Char) const;<br>
+ StringRef ltrim(StringRef Chars = " \t\n\v\f\r") const;<br>
+ StringRef rtrim(char Char) const;<br>
+ StringRef rtrim(StringRef Chars = " \t\n\v\f\r") const;<br>
+ StringRef trim(char Char) const;<br>
+ StringRef trim(StringRef Chars = " \t\n\v\f\r") const;<br>
+};<br>
+<br>
+inline bool operator==(StringRef LHS, StringRef RHS);<br>
+inline bool operator!=(StringRef LHS, StringRef RHS);<br>
+inline bool operator<(StringRef LHS, StringRef RHS);<br>
+inline bool operator<=(StringRef LHS, StringRef RHS);<br>
+inline bool operator>(StringRef LHS, StringRef RHS);<br>
+inline bool operator>=(StringRef LHS, StringRef RHS);<br>
+inline std::string &operator+=(std::string &buffer, StringRef string);<br>
+hash_code hash_value(StringRef S);<br>
+template <typename T> struct isPodLike;<br>
+template <> struct isPodLike<StringRef> { static const bool value = true; };<br>
+<br>
+} // end of namespace llvm<br>
+<br>
+//===----------------------------------------------------------------------===//<br>
+// Tests for StringRef.<br>
+//===----------------------------------------------------------------------===//<br>
+<br>
+void temporarayStringToStringRefAssignmentTest() {<br>
+ // TODO: Emit a warning.<br>
+ llvm::StringRef Ref = std::string("Yimmy yummy test.");<br>
+}<br>
+<br>
+void assigningStringToStringRefWithLongerLifetimeTest() {<br>
+ llvm::StringRef Ref;<br>
+ {<br>
+ // TODO: Emit a warning.<br>
+ std::string TmpStr("This is a fine string.");<br>
+ Ref = TmpStr;<br>
+ }<br>
+}<br>
+<br>
+std::string getTemporaryString() {<br>
+ return "One two three.";<br>
+}<br>
+<br>
+void assigningTempStringFromFunctionToStringRefTest() {<br>
+ // TODO: Emit a warning.<br>
+ llvm::StringRef Ref = getTemporaryString();<br>
+}<br>
+<br>
+//===----------------------------------------------------------------------===//<br>
+// Forward declaration for Clang AST nodes.<br>
+//===----------------------------------------------------------------------===//<br>
+<br>
+namespace llvm {<br>
+<br>
+template <class T, int Size><br>
+struct SmallVector {};<br>
+<br>
+} // end of namespace llvm<br>
+<br>
+namespace clang {<br>
+<br>
+struct Type;<br>
+struct Decl;<br>
+struct Stmt;<br>
+struct Attr;<br>
+<br>
+} // end of namespace clang<br>
+<br>
+//===----------------------------------------------------------------------===//<br>
+// Tests for Clang AST nodes.<br>
+//===----------------------------------------------------------------------===//<br>
+<br>
+namespace clang {<br>
+<br>
+struct Type {<br>
+ std::string str; // expected-warning{{AST class 'Type' has a field 'str' that allocates heap memory (type std::string)}}<br>
+};<br>
+<br>
+} // end of namespace clang<br>
+<br>
+namespace clang {<br>
+<br>
+struct Decl {<br>
+ llvm::SmallVector<int, 5> Vec; // expected-warning{{AST class 'Decl' has a field 'Vec' that allocates heap memory (type llvm::SmallVector<int, 5>)}}<br>
+};<br>
+<br>
+} // end of namespace clang<br>
<br>
Modified: cfe/trunk/test/Analysis/temporaries.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Analysis/temporaries.cpp?rev=345990&r1=345989&r2=345990&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Analysis/temporaries.cpp?rev=345990&r1=345989&r2=345990&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/test/Analysis/temporaries.cpp (original)<br>
+++ cfe/trunk/test/Analysis/temporaries.cpp Fri Nov 2 09:02:10 2018<br>
@@ -9,7 +9,7 @@ extern bool clang_analyzer_eval(bool);<br>
extern bool clang_analyzer_warnIfReached();<br>
void clang_analyzer_checkInlined(bool);<br>
<br>
-#include "Inputs/system-header-simulator-cxx.h";<br>
+#include "Inputs/system-header-simulator-cxx.h"<br>
<br>
struct Trivial {<br>
Trivial(int x) : value(x) {}<br>
<br>
Modified: cfe/trunk/www/analyzer/alpha_checks.html<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/www/analyzer/alpha_checks.html?rev=345990&r1=345989&r2=345990&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/www/analyzer/alpha_checks.html?rev=345990&r1=345989&r2=345990&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/www/analyzer/alpha_checks.html (original)<br>
+++ cfe/trunk/www/analyzer/alpha_checks.html Fri Nov 2 09:02:10 2018<br>
@@ -27,6 +27,7 @@ Patches welcome!<br>
<li><a href="#clone_alpha_checkers">Clone Alpha Checkers</a></li><br>
<li><a href="#core_alpha_checkers">Core Alpha Checkers</a></li><br>
<li><a href="#cplusplus_alpha_checkers">C++ Alpha Checkers</a></li><br>
+<li><a href="#llvm_alpha_checkers">LLVM Checkers</a></li><br>
<li><a href="#valist_alpha_checkers">Variable Argument Alpha Checkers</a></li><br>
<li><a href="#deadcode_alpha_checkers">Dead Code Alpha Checkers</a></li><br>
<li><a href="#osx_alpha_checkers">OS X Alpha Checkers</a></li><br>
@@ -583,6 +584,31 @@ void test(id x) {<br>
</pre></div></div></td></tr><br>
</tbody></table><br>
<br>
+<!-- =========================== llvm alpha =========================== --><br>
+<h3 id="llvm_alpha_checkers">LLVM Checkers</h3><br>
+<table class="checkers"><br>
+<colgroup><col class="namedescr"><col class="example"></colgroup><br>
+<thead><tr><td>Name, Description</td><td>Example</td></tr></thead><br>
+<br>
+<tbody><br>
+<tr><td><div class="namedescr expandable"><span class="name"><br>
+alpha.llvm.Conventions</span><span class="lang"><br>
+(C)</span><div class="descr"><br>
+Check code for LLVM codebase conventions:<br>
+<ul><br>
+ <li>A <code>StringRef</code> should not be bound to a temporary std::string<br>
+ whose lifetime is shorter than the <code>StringRef</code>'s.</li><br>
+ <li>Clang AST nodes should not have fields that can allocate memory.</li><br>
+</ul><br>
+</div></div></td><br>
+<td><div class="exampleContainer expandable"><br>
+<div class="example"><pre><br>
+<!-- TODO: Add examples, as currently it's hard to get this checker working. --><br>
+</pre></div></div></td></tr><br>
+<br>
+</tbody></table><br>
+<br>
+<br>
<!-- ============================== OS X alpha ============================== --><br>
<h3 id="osx_alpha_checkers">OS X Alpha Checkers</h3><br>
<table class="checkers"><br>
<br>
<br>
_______________________________________________<br>
cfe-commits mailing list<br>
<a href="mailto:cfe-commits@lists.llvm.org" target="_blank">cfe-commits@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits</a><br>
</blockquote></div>