[clang-tools-extra] r339590 - [Documentation] Remove unnecessary placeholder, grammar fix in Release Notes.

2018-08-13 Thread Eugene Zelenko via cfe-commits
Author: eugenezelenko
Date: Mon Aug 13 10:55:48 2018
New Revision: 339590

URL: http://llvm.org/viewvc/llvm-project?rev=339590&view=rev
Log:
[Documentation] Remove unnecessary placeholder, grammar fix in Release Notes.

Modified:
clang-tools-extra/trunk/docs/ReleaseNotes.rst

Modified: clang-tools-extra/trunk/docs/ReleaseNotes.rst
URL: 
http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/docs/ReleaseNotes.rst?rev=339590&r1=339589&r2=339590&view=diff
==
--- clang-tools-extra/trunk/docs/ReleaseNotes.rst (original)
+++ clang-tools-extra/trunk/docs/ReleaseNotes.rst Mon Aug 13 10:55:48 2018
@@ -57,12 +57,10 @@ The improvements are...
 Improvements to clang-tidy
 --
 
-The improvements are...
-
 - New :doc:`readability-magic-numbers
   ` check.
 
-  Detect usage of magic numbers, numbers that are used as literals instead of
+  Detects usage of magic numbers, numbers that are used as literals instead of
   introduced via constants or symbols.
 
 Improvements to include-fixer


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


[clang-tools-extra] r332277 - [Documentation] Alphabetical order of new checks in Release Notes.

2018-05-14 Thread Eugene Zelenko via cfe-commits
Author: eugenezelenko
Date: Mon May 14 12:12:40 2018
New Revision: 332277

URL: http://llvm.org/viewvc/llvm-project?rev=332277&view=rev
Log:
[Documentation] Alphabetical order of new checks in Release Notes.

Modified:
clang-tools-extra/trunk/docs/ReleaseNotes.rst

Modified: clang-tools-extra/trunk/docs/ReleaseNotes.rst
URL: 
http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/docs/ReleaseNotes.rst?rev=332277&r1=332276&r2=332277&view=diff
==
--- clang-tools-extra/trunk/docs/ReleaseNotes.rst (original)
+++ clang-tools-extra/trunk/docs/ReleaseNotes.rst Mon May 14 12:12:40 2018
@@ -76,6 +76,11 @@ Improvements to clang-tidy
   Detects and fixes calls to grand-...parent virtual methods instead of calls
   to overridden parent's virtual methods.
 
+- New :doc:`bugprone-terminating-continue
+  ` check
+
+  Checks if a ``continue`` statement terminates the loop.
+
 - New :doc:`bugprone-throw-keyword-missing
   ` check.
 
@@ -146,11 +151,6 @@ Improvements to clang-tidy
   Warns or suggests alternatives if SIMD intrinsics are used which can be 
replaced by
   ``std::experimental::simd`` operations.
 
-- New :doc:`bugprone-terminating-continue
-  ` check
-
-  Checks if a ``continue`` statement terminates the loop.
-
 - New :doc:`zircon-temporary-objects
   ` check.
 


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


r332405 - [Documentation] Fix Release Notes format issues.

2018-05-15 Thread Eugene Zelenko via cfe-commits
Author: eugenezelenko
Date: Tue May 15 14:45:01 2018
New Revision: 332405

URL: http://llvm.org/viewvc/llvm-project?rev=332405&view=rev
Log:
[Documentation] Fix Release Notes format issues.

Modified:
cfe/trunk/docs/ReleaseNotes.rst

Modified: cfe/trunk/docs/ReleaseNotes.rst
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/docs/ReleaseNotes.rst?rev=332405&r1=332404&r2=332405&view=diff
==
--- cfe/trunk/docs/ReleaseNotes.rst (original)
+++ cfe/trunk/docs/ReleaseNotes.rst Tue May 15 14:45:01 2018
@@ -99,12 +99,13 @@ New Compiler Flags
 --
 
 - :option:`-fstrict-float-cast-overflow` and
-  :option:`-fno-strict-float-cast-overflow` -
-   When a floating-point value is not representable in a destination integer
-   type, the code has undefined behavior according to the language standard.
-   By default, Clang will not guarantee any particular result in that case.
-   With the 'no-strict' option, Clang attempts to match the overflowing 
behavior
-   of the target's native float-to-int conversion instructions.
+  :option:`-fno-strict-float-cast-overflow`.
+
+  When a floating-point value is not representable in a destination integer
+  type, the code has undefined behavior according to the language standard. By
+  default, Clang will not guarantee any particular result in that case. With 
the
+  'no-strict' option, Clang attempts to match the overflowing behavior of the
+  target's native float-to-int conversion instructions.
 
 - ...
 
@@ -127,7 +128,7 @@ Modified Compiler Flags
   this: `clang --autocomplete=-cc1,-xc++,-fsyn`.
 
 New Pragmas in Clang

+
 
 Clang now supports the ...
 


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


[clang-tools-extra] r333100 - [Documentation] Move some Clang-tidy changes to proper sections.

2018-05-23 Thread Eugene Zelenko via cfe-commits
Author: eugenezelenko
Date: Wed May 23 10:25:22 2018
New Revision: 333100

URL: http://llvm.org/viewvc/llvm-project?rev=333100&view=rev
Log:
[Documentation] Move some Clang-tidy changes to proper sections.

Modified:
clang-tools-extra/trunk/docs/ReleaseNotes.rst

Modified: clang-tools-extra/trunk/docs/ReleaseNotes.rst
URL: 
http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/docs/ReleaseNotes.rst?rev=333100&r1=333099&r2=333100&view=diff
==
--- clang-tools-extra/trunk/docs/ReleaseNotes.rst (original)
+++ clang-tools-extra/trunk/docs/ReleaseNotes.rst Wed May 23 10:25:22 2018
@@ -99,10 +99,10 @@ Improvements to clang-tidy
   with looping constructs. Every backward jump is rejected. Forward jumps are
   only allowed in nested loops.
 
-- New alias :doc:`fuchsia-header-anon-namespaces
-  ` to 
:doc:`google-build-namespaces
-  `
-  added.
+- New :doc:`cppcoreguidelines-narrowing-conversions
+  `_ check
+
+  Checks for narrowing conversions, e. g. ``int i = 0; i += 0.1;``.
 
 - New :doc:`fuchsia-multiple-inheritance
   ` check.
@@ -180,6 +180,11 @@ Improvements to clang-tidy
 - The `AnalyzeTemporaryDtors` option was removed, since the corresponding
   `cfg-temporary-dtors` option of the Static Analyzer now defaults to `true`.
 
+- New alias :doc:`fuchsia-header-anon-namespaces
+  ` to 
:doc:`google-build-namespaces
+  `
+  added.
+
 - New alias :doc:`hicpp-avoid-goto
   ` to :doc:`cppcoreguidelines-avoid-goto
   `
@@ -241,11 +246,6 @@ Improvements to clang-tidy
 
 - The 'google-runtime-member-string-references' check was removed.
 
-- New `cppcoreguidelines-narrowing-conversions
-  
`_
 check
-
-  Checks for narrowing conversions, e.g. ``int i = 0; i += 0.1;``.
-
 Improvements to include-fixer
 -
 


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


[clang-tools-extra] r333104 - [Documentation] Fix link syntax in Release Notes.

2018-05-23 Thread Eugene Zelenko via cfe-commits
Author: eugenezelenko
Date: Wed May 23 10:39:46 2018
New Revision: 333104

URL: http://llvm.org/viewvc/llvm-project?rev=333104&view=rev
Log:
[Documentation] Fix link syntax in Release Notes.

Modified:
clang-tools-extra/trunk/docs/ReleaseNotes.rst

Modified: clang-tools-extra/trunk/docs/ReleaseNotes.rst
URL: 
http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/docs/ReleaseNotes.rst?rev=333104&r1=333103&r2=333104&view=diff
==
--- clang-tools-extra/trunk/docs/ReleaseNotes.rst (original)
+++ clang-tools-extra/trunk/docs/ReleaseNotes.rst Wed May 23 10:39:46 2018
@@ -100,7 +100,7 @@ Improvements to clang-tidy
   only allowed in nested loops.
 
 - New :doc:`cppcoreguidelines-narrowing-conversions
-  `_ check
+  ` check
 
   Checks for narrowing conversions, e. g. ``int i = 0; i += 0.1;``.
 


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


[clang-tools-extra] r325374 - [Documentation] Fix Sphinx error. Limit text width to 80 characters.

2018-02-16 Thread Eugene Zelenko via cfe-commits
Author: eugenezelenko
Date: Fri Feb 16 11:31:28 2018
New Revision: 325374

URL: http://llvm.org/viewvc/llvm-project?rev=325374&view=rev
Log:
[Documentation] Fix Sphinx error. Limit text width to 80 characters.

Modified:

clang-tools-extra/trunk/docs/clang-tidy/checks/readability-simd-intrinsics.rst

Modified: 
clang-tools-extra/trunk/docs/clang-tidy/checks/readability-simd-intrinsics.rst
URL: 
http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/docs/clang-tidy/checks/readability-simd-intrinsics.rst?rev=325374&r1=325373&r2=325374&view=diff
==
--- 
clang-tools-extra/trunk/docs/clang-tidy/checks/readability-simd-intrinsics.rst 
(original)
+++ 
clang-tools-extra/trunk/docs/clang-tidy/checks/readability-simd-intrinsics.rst 
Fri Feb 16 11:31:28 2018
@@ -3,7 +3,8 @@
 readability-simd-intrinsics
 ===
 
-Finds SIMD intrinsics calls and suggests ``std::experimental::simd`` 
(`P0214`_) alternatives.
+Finds SIMD intrinsics calls and suggests ``std::experimental::simd`` (`P0214`_)
+alternatives.
 
 If the option ``Suggest`` is set to non-zero, for
 
@@ -12,13 +13,11 @@ If the option ``Suggest`` is set to non-
   _mm_add_epi32(a, b); // x86
   vec_add(a, b);   // Power
 
-the check suggests an alternative:
+the check suggests an alternative: ``operator+`` on ``std::experimental::simd``
+objects.
 
-.. code-block::
-
-  operator+ on std::experimental::simd objects
-
-Otherwise, it just complains the intrinsics are non-portable (and there are 
`P0214`_ alternatives).
+Otherwise, it just complains the intrinsics are non-portable (and there are
+`P0214`_ alternatives).
 
 Many architectures provide SIMD operations (e.g. x86 SSE/AVX, Power 
AltiVec/VSX,
 ARM NEON). It is common that SIMD code implementing the same algorithm, is
@@ -26,8 +25,9 @@ written in multiple target-dispatching p
 architectures or micro-architectures.
 
 The C++ standard proposal `P0214`_ and its extensions cover many common SIMD
-operations. By migrating from target-dependent intrinsics to `P0214` 
operations,
-the SIMD code can be simplified and pieces for different targets can be 
unified.
+operations. By migrating from target-dependent intrinsics to `P0214`_
+operations, the SIMD code can be simplified and pieces for different targets 
can
+be unified.
 
 Refer to `P0214`_ for introduction and motivation for the data-parallel 
standard
 library.
@@ -37,6 +37,8 @@ Options
 
 .. option:: Suggest
 
-   If this option is set to non-zero (default is `0`), the check will suggest 
P0214 alternatives, otherwise it only points out the intrinsic function is 
non-portable.
+   If this option is set to non-zero (default is `0`), the check will suggest
+   `P0214`_ alternatives, otherwise it only points out the intrinsic function 
is
+   non-portable.
 
 .. _P0214: http://wg21.link/p0214


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


r325412 - [Basic] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC).

2018-02-16 Thread Eugene Zelenko via cfe-commits
Author: eugenezelenko
Date: Fri Feb 16 15:40:07 2018
New Revision: 325412

URL: http://llvm.org/viewvc/llvm-project?rev=325412&view=rev
Log:
[Basic] Fix some Clang-tidy modernize and Include What You Use warnings; other 
minor fixes (NFC).

Modified:
cfe/trunk/include/clang/Basic/Diagnostic.h
cfe/trunk/include/clang/Basic/DiagnosticOptions.h
cfe/trunk/include/clang/Basic/LangOptions.h
cfe/trunk/include/clang/Basic/PartialDiagnostic.h
cfe/trunk/include/clang/Basic/PlistSupport.h
cfe/trunk/include/clang/Basic/SourceLocation.h
cfe/trunk/lib/Basic/Diagnostic.cpp
cfe/trunk/lib/Basic/DiagnosticOptions.cpp
cfe/trunk/lib/Basic/LangOptions.cpp
cfe/trunk/lib/Basic/SourceLocation.cpp

Modified: cfe/trunk/include/clang/Basic/Diagnostic.h
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/Diagnostic.h?rev=325412&r1=325411&r2=325412&view=diff
==
--- cfe/trunk/include/clang/Basic/Diagnostic.h (original)
+++ cfe/trunk/include/clang/Basic/Diagnostic.h Fri Feb 16 15:40:07 2018
@@ -1,4 +1,4 @@
-//===--- Diagnostic.h - C Language Family Diagnostic Handling ---*- C++ 
-*-===//
+//===- Diagnostic.h - C Language Family Diagnostic Handling -*- C++ 
-*-===//
 //
 // The LLVM Compiler Infrastructure
 //
@@ -6,10 +6,10 @@
 // License. See LICENSE.TXT for details.
 //
 
//===--===//
-///
+//
 /// \file
 /// \brief Defines the Diagnostic-related interfaces.
-///
+//
 
//===--===//
 
 #ifndef LLVM_CLANG_BASIC_DIAGNOSTIC_H
@@ -22,12 +22,13 @@
 #include "llvm/ADT/ArrayRef.h"
 #include "llvm/ADT/DenseMap.h"
 #include "llvm/ADT/IntrusiveRefCntPtr.h"
-#include "llvm/ADT/iterator_range.h"
 #include "llvm/ADT/SmallVector.h"
 #include "llvm/ADT/StringRef.h"
-#include 
+#include "llvm/ADT/iterator_range.h"
+#include "llvm/Support/Compiler.h" 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -44,13 +45,14 @@ class DiagnosticConsumer;
 class IdentifierInfo;
 class LangOptions;
 class Preprocessor;
+class SourceManager;
 class StoredDiagnostic;
 
 namespace tok {
 
-  enum TokenKind : unsigned short;
+enum TokenKind : unsigned short;
 
-} // end namespace tok
+} // namespace tok
 
 /// \brief Annotates a diagnostic with some code that should be
 /// inserted, removed, or replaced to fix the problem.
@@ -75,11 +77,11 @@ public:
   /// string.
   std::string CodeToInsert;
 
-  bool BeforePreviousInsertions;
+  bool BeforePreviousInsertions = false;
 
   /// \brief Empty code modification hint, indicating that no code
   /// modification is known.
-  FixItHint() : BeforePreviousInsertions(false) { }
+  FixItHint() = default;
 
   bool isNull() const {
 return !RemoveRange.isValid();
@@ -157,43 +159,86 @@ public:
   };
 
   enum ArgumentKind {
-ak_std_string,  ///< std::string
-ak_c_string,///< const char *
-ak_sint,///< int
-ak_uint,///< unsigned
-ak_tokenkind,   ///< enum TokenKind : unsigned
-ak_identifierinfo,  ///< IdentifierInfo
-ak_qualtype,///< QualType
-ak_declarationname, ///< DeclarationName
-ak_nameddecl,   ///< NamedDecl *
-ak_nestednamespec,  ///< NestedNameSpecifier *
-ak_declcontext, ///< DeclContext *
-ak_qualtype_pair,   ///< pair
-ak_attr ///< Attr *
+/// std::string
+ak_std_string,
+
+/// const char *
+ak_c_string,
+
+/// int
+ak_sint,
+
+/// unsigned
+ak_uint,
+
+/// enum TokenKind : unsigned
+ak_tokenkind,
+
+/// IdentifierInfo
+ak_identifierinfo,
+
+/// QualType
+ak_qualtype,
+
+/// DeclarationName
+ak_declarationname,
+
+/// NamedDecl *
+ak_nameddecl,
+
+/// NestedNameSpecifier *
+ak_nestednamespec,
+
+/// DeclContext *
+ak_declcontext,
+
+/// pair
+ak_qualtype_pair,
+
+/// Attr *
+ak_attr
   };
 
   /// \brief Represents on argument value, which is a union discriminated
   /// by ArgumentKind, with a value.
-  typedef std::pair ArgumentValue;
+  using ArgumentValue = std::pair;
 
 private:
-  unsigned char AllExtensionsSilenced; // Used by __extension__
-  bool SuppressAfterFatalError;  // Suppress diagnostics after a fatal error?
-  bool SuppressAllDiagnostics;   // Suppress all diagnostics.
-  bool ElideType;// Elide common types of templates.
-  bool PrintTemplateTree;// Print a tree when comparing templates.
-  bool ShowColors;   // Color printing is enabled.
-  OverloadsShown ShowOverloads;  // Which overload candidates to show.
-  unsigned ErrorLimit;   // Cap of # errors emitted, 0 -> no limit.
-  unsigned TemplateBacktraceLimit; // Cap on depth of template backtrace stack,
-   // 0 -> no limit.
-  unsigned Con

r325544 - [Sema] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC).

2018-02-19 Thread Eugene Zelenko via cfe-commits
Author: eugenezelenko
Date: Mon Feb 19 18:16:28 2018
New Revision: 325544

URL: http://llvm.org/viewvc/llvm-project?rev=325544&view=rev
Log:
[Sema] Fix some Clang-tidy modernize and Include What You Use warnings; other 
minor fixes (NFC).

Modified:
cfe/trunk/include/clang/Sema/AttributeList.h
cfe/trunk/include/clang/Sema/CodeCompleteConsumer.h
cfe/trunk/include/clang/Sema/Ownership.h
cfe/trunk/lib/Sema/AttributeList.cpp
cfe/trunk/lib/Sema/CodeCompleteConsumer.cpp

Modified: cfe/trunk/include/clang/Sema/AttributeList.h
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Sema/AttributeList.h?rev=325544&r1=325543&r2=325544&view=diff
==
--- cfe/trunk/include/clang/Sema/AttributeList.h (original)
+++ cfe/trunk/include/clang/Sema/AttributeList.h Mon Feb 19 18:16:28 2018
@@ -1,4 +1,4 @@
-//===--- AttributeList.h - Parsed attribute sets *- C++ 
-*-===//
+//===- AttributeList.h - Parsed attribute sets --*- C++ 
-*-===//
 //
 // The LLVM Compiler Infrastructure
 //
@@ -24,11 +24,17 @@
 #include "llvm/ADT/SmallVector.h"
 #include "llvm/Support/Allocator.h"
 #include 
+#include 
+#include 
+#include 
 
 namespace clang {
-  class ASTContext;
-  class IdentifierInfo;
-  class Expr;
+
+class ASTContext;
+class Decl;
+class Expr;
+class IdentifierInfo;
+class LangOptions;
 
 /// \brief Represents information about a change in availability for
 /// an entity, which is part of the encoding of the 'availability'
@@ -48,6 +54,7 @@ struct AvailabilityChange {
 };
 
 namespace {
+
 enum AvailabilitySlot {
   IntroducedSlot, DeprecatedSlot, ObsoletedSlot, NumAvailabilitySlots
 };
@@ -57,6 +64,7 @@ struct AvailabilityData {
   AvailabilityChange Changes[NumAvailabilitySlots];
   SourceLocation StrictLoc;
   const Expr *Replacement;
+
   AvailabilityData(const AvailabilityChange &Introduced,
const AvailabilityChange &Deprecated,
const AvailabilityChange &Obsoleted,
@@ -67,7 +75,8 @@ struct AvailabilityData {
 Changes[ObsoletedSlot] = Obsoleted;
   }
 };
-}
+
+} // namespace
 
 /// \brief Wraps an identifier and optional source location for the identifier.
 struct IdentifierLoc {
@@ -80,8 +89,8 @@ struct IdentifierLoc {
 
 /// \brief A union of the various pointer types that can be passed to an
 /// AttributeList as an argument.
-typedef llvm::PointerUnion ArgsUnion;
-typedef llvm::SmallVector ArgsVector;
+using ArgsUnion = llvm::PointerUnion;
+using ArgsVector = llvm::SmallVector;
 
 /// AttributeList - Represents a syntactic attribute.
 ///
@@ -98,18 +107,25 @@ public:
   enum Syntax {
 /// __attribute__((...))
 AS_GNU,
+
 /// [[...]]
 AS_CXX11,
+
 /// [[...]]
 AS_C2x,
+
 /// __declspec(...)
 AS_Declspec,
+
 /// [uuid("...")] class Foo
 AS_Microsoft,
+
 /// __ptr16, alignas(...), etc.
 AS_Keyword,
+
 /// #pragma ...
 AS_Pragma,
+
 // Note TableGen depends on the order above.  Do not add or change the 
order
 // without adding related code to TableGen/ClangAttrEmitter.cpp.
 /// Context-sensitive version of a keyword attribute.
@@ -166,10 +182,10 @@ private:
   const Expr *MessageExpr;
 
   /// The next attribute in the current position.
-  AttributeList *NextInPosition;
+  AttributeList *NextInPosition = nullptr;
 
   /// The next attribute allocated in the current Pool.
-  AttributeList *NextInPool;
+  AttributeList *NextInPool = nullptr;
 
   /// Arguments, if any, are stored immediately following the object.
   ArgsUnion *getArgsBuffer() { return reinterpret_cast(this + 1); 
}
@@ -194,63 +210,25 @@ public:
   };
   struct PropertyData {
 IdentifierInfo *GetterId, *SetterId;
+
 PropertyData(IdentifierInfo *getterId, IdentifierInfo *setterId)
-: GetterId(getterId), SetterId(setterId) {}
+: GetterId(getterId), SetterId(setterId) {}
   };
 
 private:
-  /// Type tag information is stored immediately following the arguments, if
-  /// any, at the end of the object.  They are mutually exlusive with
-  /// availability slots.
-  TypeTagForDatatypeData &getTypeTagForDatatypeDataSlot() {
-return *reinterpret_cast(getArgsBuffer()+NumArgs);
-  }
-
-  const TypeTagForDatatypeData &getTypeTagForDatatypeDataSlot() const {
-return *reinterpret_cast(getArgsBuffer()
-+ NumArgs);
-  }
-
-  /// The type buffer immediately follows the object and are mutually exclusive
-  /// with arguments.
-  ParsedType &getTypeBuffer() {
-return *reinterpret_cast(this + 1);
-  }
-
-  const ParsedType &getTypeBuffer() const {
-return *reinterpret_cast(this + 1);
-  }
-
-  /// The property data immediately follows the object is is mutually exclusive
-  /// with arguments.
-  PropertyData &getPropertyDataBuffer() {
-assert(IsProperty);
-return *reinterpret_cast(this + 1);
-  }
-
-  const Prop

r325659 - [Sema] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC).

2018-02-20 Thread Eugene Zelenko via cfe-commits
Author: eugenezelenko
Date: Tue Feb 20 17:45:26 2018
New Revision: 325659

URL: http://llvm.org/viewvc/llvm-project?rev=325659&view=rev
Log:
[Sema] Fix some Clang-tidy modernize and Include What You Use warnings; other 
minor fixes (NFC).

Modified:
cfe/trunk/include/clang/Sema/DelayedDiagnostic.h
cfe/trunk/include/clang/Sema/IdentifierResolver.h
cfe/trunk/include/clang/Sema/Initialization.h
cfe/trunk/include/clang/Sema/Lookup.h
cfe/trunk/include/clang/Sema/Overload.h
cfe/trunk/lib/Sema/DelayedDiagnostic.cpp
cfe/trunk/lib/Sema/IdentifierResolver.cpp

Modified: cfe/trunk/include/clang/Sema/DelayedDiagnostic.h
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Sema/DelayedDiagnostic.h?rev=325659&r1=325658&r2=325659&view=diff
==
--- cfe/trunk/include/clang/Sema/DelayedDiagnostic.h (original)
+++ cfe/trunk/include/clang/Sema/DelayedDiagnostic.h Tue Feb 20 17:45:26 2018
@@ -1,4 +1,4 @@
-//===--- DelayedDiagnostic.h - Delayed declarator diagnostics ---*- C++ 
-*-===//
+//===- DelayedDiagnostic.h - Delayed declarator diagnostics -*- C++ 
-*-===//
 //
 // The LLVM Compiler Infrastructure
 //
@@ -6,7 +6,7 @@
 // License. See LICENSE.TXT for details.
 //
 
//===--===//
-///
+//
 /// \file
 /// \brief Defines the classes clang::DelayedDiagnostic and 
 /// clang::AccessedEntity.
@@ -16,15 +16,33 @@
 /// diagnostics -- notably deprecation and access control -- are suppressed
 /// based on semantic properties of the parsed declaration that aren't known
 /// until it is fully parsed.
-///
+//
 
//===--===//
 
 #ifndef LLVM_CLANG_SEMA_DELAYEDDIAGNOSTIC_H
 #define LLVM_CLANG_SEMA_DELAYEDDIAGNOSTIC_H
 
+#include "clang/AST/DeclAccessPair.h"
+#include "clang/AST/DeclBase.h"
+#include "clang/AST/DeclCXX.h"
+#include "clang/AST/Type.h"
+#include "clang/Basic/LLVM.h"
+#include "clang/Basic/PartialDiagnostic.h"
+#include "clang/Basic/SourceLocation.h"
+#include "clang/Basic/Specifiers.h"
 #include "clang/Sema/Sema.h"
+#include "llvm/ADT/SmallVector.h"
+#include "llvm/ADT/StringRef.h"
+#include "llvm/Support/Casting.h"
+#include 
+#include 
+#include 
 
 namespace clang {
+
+class ObjCInterfaceDecl;
+class ObjCPropertyDecl;
+
 namespace sema {
 
 /// A declaration being accessed, together with information about how
@@ -39,16 +57,14 @@ public:
   /// The target is the base class.
   enum BaseNonce { Base };
 
-  bool isMemberAccess() const { return IsMember; }
-
   AccessedEntity(PartialDiagnostic::StorageAllocator &Allocator,
  MemberNonce _,
  CXXRecordDecl *NamingClass,
  DeclAccessPair FoundDecl,
  QualType BaseObjectType)
-: Access(FoundDecl.getAccess()), IsMember(true),
-  Target(FoundDecl.getDecl()), NamingClass(NamingClass),
-  BaseObjectType(BaseObjectType), Diag(0, Allocator) {
+  : Access(FoundDecl.getAccess()), IsMember(true),
+Target(FoundDecl.getDecl()), NamingClass(NamingClass),
+BaseObjectType(BaseObjectType), Diag(0, Allocator) {
   }
 
   AccessedEntity(PartialDiagnostic::StorageAllocator &Allocator,
@@ -56,11 +72,10 @@ public:
  CXXRecordDecl *BaseClass,
  CXXRecordDecl *DerivedClass,
  AccessSpecifier Access)
-: Access(Access), IsMember(false),
-  Target(BaseClass),
-  NamingClass(DerivedClass),
-  Diag(0, Allocator) {
-  }
+  : Access(Access), IsMember(false), Target(BaseClass),
+NamingClass(DerivedClass), Diag(0, Allocator) {}
+
+  bool isMemberAccess() const { return IsMember; }
 
   bool isQuiet() const { return Diag.getDiagID() == 0; }
 
@@ -216,7 +231,6 @@ public:
   }
 
 private:
-
   struct AD {
 const NamedDecl *ReferringDecl;
 const NamedDecl *OffendingDecl;
@@ -248,20 +262,17 @@ class DelayedDiagnosticPool {
   const DelayedDiagnosticPool *Parent;
   SmallVector Diagnostics;
 
-  DelayedDiagnosticPool(const DelayedDiagnosticPool &) = delete;
-  void operator=(const DelayedDiagnosticPool &) = delete;
 public:
   DelayedDiagnosticPool(const DelayedDiagnosticPool *parent) : Parent(parent) 
{}
-  ~DelayedDiagnosticPool() {
-for (SmallVectorImpl::iterator
-   i = Diagnostics.begin(), e = Diagnostics.end(); i != e; ++i)
-  i->Destroy();
-  }
+
+  DelayedDiagnosticPool(const DelayedDiagnosticPool &) = delete;
+  DelayedDiagnosticPool &operator=(const DelayedDiagnosticPool &) = delete;
 
   DelayedDiagnosticPool(DelayedDiagnosticPool &&Other)
-: Parent(Other.Parent), Diagnostics(std::move(Other.Diagnostics)) {
+  : Parent(Other.Parent), Diagnostics(std::move(Other.Diagnostics)) {
 Other.Diagnostics.clear();
   }
+
   DelayedDiagnosticPool &operator=(DelayedDiagnosticPool &&Other) {
 Parent = Other.Parent;
 Diagnostics = st

r325834 - [Sema] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC).

2018-02-22 Thread Eugene Zelenko via cfe-commits
Author: eugenezelenko
Date: Thu Feb 22 14:35:17 2018
New Revision: 325834

URL: http://llvm.org/viewvc/llvm-project?rev=325834&view=rev
Log:
[Sema] Fix some Clang-tidy modernize and Include What You Use warnings; other 
minor fixes (NFC).

Modified:
cfe/trunk/include/clang/Sema/Scope.h
cfe/trunk/include/clang/Sema/ScopeInfo.h
cfe/trunk/include/clang/Sema/Template.h
cfe/trunk/include/clang/Sema/TemplateDeduction.h
cfe/trunk/include/clang/Sema/TypoCorrection.h
cfe/trunk/include/clang/Serialization/ASTReader.h
cfe/trunk/lib/Sema/SemaTemplateDeduction.cpp

Modified: cfe/trunk/include/clang/Sema/Scope.h
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Sema/Scope.h?rev=325834&r1=325833&r2=325834&view=diff
==
--- cfe/trunk/include/clang/Sema/Scope.h (original)
+++ cfe/trunk/include/clang/Sema/Scope.h Thu Feb 22 14:35:17 2018
@@ -1,4 +1,4 @@
-//===--- Scope.h - Scope interface --*- C++ 
-*-===//
+//===- Scope.h - Scope interface *- C++ 
-*-===//
 //
 // The LLVM Compiler Infrastructure
 //
@@ -14,28 +14,29 @@
 #ifndef LLVM_CLANG_SEMA_SCOPE_H
 #define LLVM_CLANG_SEMA_SCOPE_H
 
-#include "clang/AST/Decl.h"
 #include "clang/Basic/Diagnostic.h"
 #include "llvm/ADT/PointerIntPair.h"
 #include "llvm/ADT/SmallPtrSet.h"
 #include "llvm/ADT/SmallVector.h"
+#include "llvm/ADT/iterator_range.h"
+#include 
 
 namespace llvm {
 
 class raw_ostream;
 
-}
+} // namespace llvm
 
 namespace clang {
 
 class Decl;
+class DeclContext;
 class UsingDirectiveDecl;
 class VarDecl;
 
 /// Scope - A scope is a transient data structure that is used while parsing 
the
 /// program.  It assists with resolving identifiers to the appropriate
 /// declaration.
-///
 class Scope {
 public:
   /// ScopeFlags - These are bitfields that are or'd together when creating a
@@ -131,6 +132,7 @@ public:
 /// We are between inheritance colon and the real class/struct definition 
scope.
 ClassInheritanceScope = 0x80,
   };
+
 private:
   /// The parent scope for this scope.  This is null for the translation-unit
   /// scope.
@@ -185,7 +187,7 @@ private:
   /// popped, these declarations are removed from the IdentifierTable's notion
   /// of current declaration.  It is up to the current Action implementation to
   /// implement these semantics.
-  typedef llvm::SmallPtrSet DeclSetTy;
+  using DeclSetTy = llvm::SmallPtrSet;
   DeclSetTy DeclsInScope;
 
   /// The DeclContext with which this scope is associated. For
@@ -193,7 +195,7 @@ private:
   /// entity of a function scope is a function, etc.
   DeclContext *Entity;
 
-  typedef SmallVector UsingDirectivesTy;
+  using UsingDirectivesTy = SmallVector;
   UsingDirectivesTy UsingDirectives;
 
   /// \brief Used to determine if errors occurred in this scope.
@@ -207,25 +209,23 @@ private:
 
 public:
   Scope(Scope *Parent, unsigned ScopeFlags, DiagnosticsEngine &Diag)
-: ErrorTrap(Diag) {
+  : ErrorTrap(Diag) {
 Init(Parent, ScopeFlags);
   }
 
   /// getFlags - Return the flags for this scope.
-  ///
   unsigned getFlags() const { return Flags; }
+
   void setFlags(unsigned F) { setFlags(getParent(), F); }
 
   /// isBlockScope - Return true if this scope correspond to a closure.
   bool isBlockScope() const { return Flags & BlockScope; }
 
   /// getParent - Return the scope that this is nested in.
-  ///
   const Scope *getParent() const { return AnyParent; }
   Scope *getParent() { return AnyParent; }
 
   /// getFnParent - Return the closest scope that is a function body.
-  ///
   const Scope *getFnParent() const { return FnParent; }
   Scope *getFnParent() { return FnParent; }
 
@@ -275,10 +275,12 @@ public:
 return PrototypeIndex++;
   }
 
-  typedef llvm::iterator_range decl_range;
+  using decl_range = llvm::iterator_range;
+
   decl_range decls() const {
 return decl_range(DeclsInScope.begin(), DeclsInScope.end());
   }
+
   bool decl_empty() const { return DeclsInScope.empty(); }
 
   void AddDecl(Decl *D) {
@@ -368,7 +370,6 @@ public:
 return false;
   }
 
-  
   /// isTemplateParamScope - Return true if this scope is a C++
   /// template parameter scope.
   bool isTemplateParamScope() const {
@@ -457,8 +458,8 @@ public:
 UsingDirectives.push_back(UDir);
   }
 
-  typedef llvm::iterator_range
-using_directives_range;
+  using using_directives_range =
+  llvm::iterator_range;
 
   using_directives_range using_directives() {
 return using_directives_range(UsingDirectives.begin(),
@@ -477,25 +478,23 @@ public:
   }
 
   void setNoNRVO() {
-NRVO.setInt(1);
+NRVO.setInt(true);
 NRVO.setPointer(nullptr);
   }
 
   void mergeNRVOIntoParent();
 
   /// Init - This is used by the parser to implement scope caching.
-  ///
   void Init(Scope *parent, unsigned flags);
 
   /// \brief Sets up the specified scope flags and adjusts the scope state

r326146 - [StaticAnalyzer] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC).

2018-02-26 Thread Eugene Zelenko via cfe-commits
Author: eugenezelenko
Date: Mon Feb 26 15:15:52 2018
New Revision: 326146

URL: http://llvm.org/viewvc/llvm-project?rev=326146&view=rev
Log:
[StaticAnalyzer] Fix some Clang-tidy modernize and Include What You Use 
warnings; other minor fixes (NFC).

Modified:
cfe/trunk/include/clang/StaticAnalyzer/Core/CheckerManager.h
cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/ExplodedGraph.h
cfe/trunk/lib/StaticAnalyzer/Core/CheckerManager.cpp
cfe/trunk/lib/StaticAnalyzer/Core/ExplodedGraph.cpp
cfe/trunk/lib/StaticAnalyzer/Core/HTMLDiagnostics.cpp

Modified: cfe/trunk/include/clang/StaticAnalyzer/Core/CheckerManager.h
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/StaticAnalyzer/Core/CheckerManager.h?rev=326146&r1=326145&r2=326146&view=diff
==
--- cfe/trunk/include/clang/StaticAnalyzer/Core/CheckerManager.h (original)
+++ cfe/trunk/include/clang/StaticAnalyzer/Core/CheckerManager.h Mon Feb 26 
15:15:52 2018
@@ -1,4 +1,4 @@
-//===--- CheckerManager.h - Static Analyzer Checker Manager -*- C++ 
-*-===//
+//===- CheckerManager.h - Static Analyzer Checker Manager ---*- C++ 
-*-===//
 //
 // The LLVM Compiler Infrastructure
 //
@@ -16,45 +16,56 @@
 
 #include "clang/Analysis/ProgramPoint.h"
 #include "clang/Basic/LangOptions.h"
-#include "clang/StaticAnalyzer/Core/AnalyzerOptions.h"
+#include "clang/StaticAnalyzer/Core/PathSensitive/ProgramState_Fwd.h"
 #include "clang/StaticAnalyzer/Core/PathSensitive/Store.h"
+#include "llvm/ADT/ArrayRef.h"
 #include "llvm/ADT/DenseMap.h"
 #include "llvm/ADT/SmallVector.h"
-#include 
+#include "llvm/ADT/StringRef.h"
 #include 
 
 namespace clang {
-  class Decl;
-  class Stmt;
-  class CallExpr;
+
+class AnalyzerOptions;
+class CallExpr;
+class CXXNewExpr;
+class Decl;
+class LocationContext;
+class Stmt;
+class TranslationUnitDecl;
 
 namespace ento {
-  class CheckerBase;
-  class CheckerRegistry;
-  class ExprEngine;
-  class AnalysisManager;
-  class BugReporter;
-  class CheckerContext;
-  class ObjCMethodCall;
-  class SVal;
-  class ExplodedNode;
-  class ExplodedNodeSet;
-  class ExplodedGraph;
-  class ProgramState;
-  class NodeBuilder;
-  struct NodeBuilderContext;
-  class MemRegion;
-  class SymbolReaper;
+
+class AnalysisManager;
+class BugReporter;
+class CallEvent;
+class CheckerBase;
+class CheckerContext;
+class CheckerRegistry;
+class ExplodedGraph;
+class ExplodedNode;
+class ExplodedNodeSet;
+class ExprEngine;
+class MemRegion;
+struct NodeBuilderContext;
+class ObjCMethodCall;
+class RegionAndSymbolInvalidationTraits;
+class SVal;
+class SymbolReaper;
 
 template  class CheckerFn;
 
 template 
 class CheckerFn {
-  typedef RET (*Func)(void *, Ps...);
+  using Func = RET (*)(void *, Ps...);
+
   Func Fn;
+
 public:
   CheckerBase *Checker;
-  CheckerFn(CheckerBase *checker, Func fn) : Fn(fn), Checker(checker) { }
+
+  CheckerFn(CheckerBase *checker, Func fn) : Fn(fn), Checker(checker) {}
+
   RET operator()(Ps... ps) const {
 return Fn(Checker, ps...);
   }
@@ -85,12 +96,15 @@ enum PointerEscapeKind {
 // name strings have a lifetime that keeps them alive at least until the path
 // diagnostics have been processed.
 class CheckName {
-  StringRef Name;
   friend class ::clang::ento::CheckerRegistry;
+
+  StringRef Name;
+
   explicit CheckName(StringRef Name) : Name(Name) {}
 
 public:
   CheckName() = default;
+
   StringRef getName() const { return Name; }
 };
 
@@ -121,9 +135,9 @@ public:
   const LangOptions &getLangOpts() const { return LangOpts; }
   AnalyzerOptions &getAnalyzerOptions() { return AOptions; }
 
-  typedef CheckerBase *CheckerRef;
-  typedef const void *CheckerTag;
-  typedef CheckerFn CheckerDtor;
+  using CheckerRef = CheckerBase *;
+  using CheckerTag = const void *;
+  using CheckerDtor = CheckerFn;
 
 
//===--===//
 // registerChecker
@@ -238,7 +252,6 @@ public:
   Eng);
   }
 
-
   /// \brief Run checkers for visiting obj-c messages.
   void runCheckersForObjCMessage(ObjCMessageVisitKind visitKind,
  ExplodedNodeSet &Dst,
@@ -368,7 +381,7 @@ public:
   const InvalidatedSymbols &Escaped,
   const CallEvent *Call,
   PointerEscapeKind Kind,
- RegionAndSymbolInvalidationTraits *ITraits);
+  RegionAndSymbolInvalidationTraits *ITraits);
 
   /// \brief Run checkers for handling assumptions on symbolic values.
   ProgramStateRef runCheckersForEvalAssume(ProgramStateRef state,
@@ -404,10 +417,11 @@ public:
   // Functions used by the registration mechanism, checkers should not touch
   // these directly.
 
-  typedef CheckerFn
-  CheckDeclFunc;
+  using CheckDeclFunc =
+  CheckerFn;
+
+  using HandlesDeclFunc = bool (*)(c

[clang-tools-extra] r303884 - [Documentation] Mention hicpp check group in Clang-tidy main document.

2017-05-25 Thread Eugene Zelenko via cfe-commits
Author: eugenezelenko
Date: Thu May 25 12:22:29 2017
New Revision: 303884

URL: http://llvm.org/viewvc/llvm-project?rev=303884&view=rev
Log:
[Documentation] Mention hicpp check group in Clang-tidy main document.

Modified:
clang-tools-extra/trunk/docs/clang-tidy/index.rst

Modified: clang-tools-extra/trunk/docs/clang-tidy/index.rst
URL: 
http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/docs/clang-tidy/index.rst?rev=303884&r1=303883&r2=303884&view=diff
==
--- clang-tools-extra/trunk/docs/clang-tidy/index.rst (original)
+++ clang-tools-extra/trunk/docs/clang-tidy/index.rst Thu May 25 12:22:29 2017
@@ -59,7 +59,8 @@ Name prefixDescription
 ``cert-``  Checks related to CERT Secure Coding Guidelines.
 ``cppcoreguidelines-`` Checks related to C++ Core Guidelines.
 ``clang-analyzer-``Clang Static Analyzer checks.
-``google-``Checks related to the Google coding conventions.
+``google-``Checks related to Google coding conventions.
+``hicpp-`` Checks related to High Integrity C++ Coding Standard.
 ``llvm-``  Checks related to the LLVM coding conventions.
 ``misc-``  Checks that we didn't have a better category for.
 ``modernize-`` Checks that advocate usage of modern (currently "modern"
@@ -652,7 +653,7 @@ The script provides multiple configurati
 * To restrict the files examined you can provide one or more regex arguments
   that the file names are matched against.
   ``run-clang-tidy.py clang-tidy/.*Check\.cpp`` will only analyze clang-tidy
-  checkers. It may also be necessary to restrict the header files warnings are
+  checks. It may also be necessary to restrict the header files warnings are
   displayed from using the ``-header-filter`` flag. It has the same behavior
   as the corresponding :program:`clang-tidy` flag.
 


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


Re: [clang-tools-extra] r303884 - [Documentation] Mention hicpp check group in Clang-tidy main document.

2017-05-25 Thread Eugene Zelenko via cfe-commits
Hi, Alexander!

On Thu, May 25, 2017 at 5:16 PM, Alexander Kornienko  wrote:
>
>
> On 25 May 2017 19:22, "Eugene Zelenko via cfe-commits"
>  wrote:
>
> Author: eugenezelenko
> Date: Thu May 25 12:22:29 2017
> New Revision: 303884
>
> URL: http://llvm.org/viewvc/llvm-project?rev=303884&view=rev
> Log:
> [Documentation] Mention hicpp check group in Clang-tidy main document.
>
> Modified:
> clang-tools-extra/trunk/docs/clang-tidy/index.rst
>
> Modified: clang-tools-extra/trunk/docs/clang-tidy/index.rst
> URL:
> http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/docs/clang-tidy/index.rst?rev=303884&r1=303883&r2=303884&view=diff
> ==
> --- clang-tools-extra/trunk/docs/clang-tidy/index.rst (original)
> +++ clang-tools-extra/trunk/docs/clang-tidy/index.rst Thu May 25 12:22:29
> 2017
> @@ -59,7 +59,8 @@ Name prefixDescription
>  ``cert-``  Checks related to CERT Secure Coding Guidelines.
>  ``cppcoreguidelines-`` Checks related to C++ Core Guidelines.
>  ``clang-analyzer-``Clang Static Analyzer checks.
> -``google-``Checks related to the Google coding conventions.
> +``google-``Checks related to Google coding conventions.
>
>
> Could you explain why you think that the article should be omitted here?
> (Maybe a native speaker could chime in? ;)

I'm not native speaker, but I think article should be used/not used
consistently for all references in this table.

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


r326292 - [StaticAnalyzer] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC).

2018-02-27 Thread Eugene Zelenko via cfe-commits
Author: eugenezelenko
Date: Tue Feb 27 17:10:04 2018
New Revision: 326292

URL: http://llvm.org/viewvc/llvm-project?rev=326292&view=rev
Log:
[StaticAnalyzer] Fix some Clang-tidy modernize and Include What You Use 
warnings; other minor fixes (NFC).

Modified:
cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h

cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/ConstraintManager.h
cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/DynamicTypeMap.h
cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/Environment.h
cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/FunctionSummary.h
cfe/trunk/lib/StaticAnalyzer/Core/CallEvent.cpp
cfe/trunk/lib/StaticAnalyzer/Core/ConstraintManager.cpp
cfe/trunk/lib/StaticAnalyzer/Core/DynamicTypeMap.cpp
cfe/trunk/lib/StaticAnalyzer/Core/Environment.cpp
cfe/trunk/lib/StaticAnalyzer/Core/FunctionSummary.cpp

Modified: cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h?rev=326292&r1=326291&r2=326292&view=diff
==
--- cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h 
(original)
+++ cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h Tue 
Feb 27 17:10:04 2018
@@ -1,4 +1,4 @@
-//===- CallEvent.h - Wrapper for all function and method calls *- C++ 
-*--//
+//===- CallEvent.h - Wrapper for all function and method calls --*- C++ 
-*-===//
 //
 // The LLVM Compiler Infrastructure
 //
@@ -16,19 +16,42 @@
 #ifndef LLVM_CLANG_STATICANALYZER_CORE_PATHSENSITIVE_CALLEVENT_H
 #define LLVM_CLANG_STATICANALYZER_CORE_PATHSENSITIVE_CALLEVENT_H
 
+#include "clang/AST/Decl.h"
+#include "clang/AST/DeclBase.h"
 #include "clang/AST/DeclCXX.h"
+#include "clang/AST/DeclObjC.h"
+#include "clang/AST/Expr.h"
 #include "clang/AST/ExprCXX.h"
 #include "clang/AST/ExprObjC.h"
-#include "clang/Analysis/AnalysisDeclContext.h"
+#include "clang/AST/Stmt.h"
+#include "clang/AST/Type.h"
+#include "clang/Basic/IdentifierTable.h"
+#include "clang/Basic/LLVM.h"
+#include "clang/Basic/SourceLocation.h"
 #include "clang/Basic/SourceManager.h"
 #include "clang/StaticAnalyzer/Core/PathSensitive/ProgramState.h"
+#include "clang/StaticAnalyzer/Core/PathSensitive/ProgramState_Fwd.h"
 #include "clang/StaticAnalyzer/Core/PathSensitive/SVals.h"
+#include "llvm/ADT/ArrayRef.h"
+#include "llvm/ADT/IntrusiveRefCntPtr.h"
 #include "llvm/ADT/PointerIntPair.h"
+#include "llvm/ADT/PointerUnion.h"
+#include "llvm/ADT/STLExtras.h"
+#include "llvm/ADT/SmallVector.h"
+#include "llvm/ADT/StringRef.h"
+#include "llvm/Support/Allocator.h"
+#include "llvm/Support/Casting.h"
+#include "llvm/Support/ErrorHandling.h"
+#include 
+#include 
 #include 
 
 namespace clang {
+
+class LocationContext;
 class ProgramPoint;
 class ProgramPointTag;
+class StackFrameContext;
 
 namespace ento {
 
@@ -48,19 +71,20 @@ enum CallEventKind {
 };
 
 class CallEvent;
-class CallEventManager;
 
 /// This class represents a description of a function call using the number of
 /// arguments and the name of the function.
 class CallDescription {
   friend CallEvent;
-  mutable IdentifierInfo *II;
-  mutable bool IsLookupDone;
+
+  mutable IdentifierInfo *II = nullptr;
+  mutable bool IsLookupDone = false;
   StringRef FuncName;
   unsigned RequiredArgs;
 
 public:
-  const static unsigned NoArgRequirement = ~0;
+  const static unsigned NoArgRequirement = 
std::numeric_limits::max();
+
   /// \brief Constructs a CallDescription object.
   ///
   /// @param FuncName The name of the function that will be matched.
@@ -69,8 +93,7 @@ public:
   /// call. Omit this parameter to match every occurance of call with a given
   /// name regardless the number of arguments.
   CallDescription(StringRef FuncName, unsigned RequiredArgs = NoArgRequirement)
-  : II(nullptr), IsLookupDone(false), FuncName(FuncName),
-RequiredArgs(RequiredArgs) {}
+  : FuncName(FuncName), RequiredArgs(RequiredArgs) {}
 
   /// \brief Get the name of the function that this object matches.
   StringRef getFunctionName() const { return FuncName; }
@@ -104,18 +127,19 @@ public:
 class RuntimeDefinition {
   /// The Declaration of the function which could be called at runtime.
   /// NULL if not available.
-  const Decl *D;
+  const Decl *D = nullptr;
 
   /// The region representing an object (ObjC/C++) on which the method is
   /// called. With dynamic dispatch, the method definition depends on the
   /// runtime type of this object. NULL when the DynamicTypeInfo is
   /// precise.
-  const MemRegion *R;
+  const MemRegion *R = nullptr;
 
 public:
-  RuntimeDefinition(): D(nullptr), R(nullptr) {}
-  RuntimeDefinition(const Decl *InD): D(InD), R(nullptr) {}
+  RuntimeDefinition() = default;
+  RuntimeDefinition(const Decl *InD): D(InD) {}
   Runt

[clang-tools-extra] r326354 - [Documentation] Split Clang-tidy changes in Release Notes into sections: new checks, new aliases, renamed checks; sort all of them alphabetically. Enforce 80 characters l

2018-02-28 Thread Eugene Zelenko via cfe-commits
Author: eugenezelenko
Date: Wed Feb 28 11:15:49 2018
New Revision: 326354

URL: http://llvm.org/viewvc/llvm-project?rev=326354&view=rev
Log:
[Documentation] Split Clang-tidy changes in Release Notes into sections: new 
checks, new aliases, renamed checks; sort all of them alphabetically. Enforce 
80 characters line length limit. Highlight C++ keywords.

Modified:
clang-tools-extra/trunk/docs/ReleaseNotes.rst
clang-tools-extra/trunk/docs/clang-tidy/checks/fuchsia-trailing-return.rst

clang-tools-extra/trunk/docs/clang-tidy/checks/modernize-use-uncaught-exceptions.rst

Modified: clang-tools-extra/trunk/docs/ReleaseNotes.rst
URL: 
http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/docs/ReleaseNotes.rst?rev=326354&r1=326353&r2=326354&view=diff
==
--- clang-tools-extra/trunk/docs/ReleaseNotes.rst (original)
+++ clang-tools-extra/trunk/docs/ReleaseNotes.rst Wed Feb 28 11:15:49 2018
@@ -57,23 +57,11 @@ The improvements are...
 Improvements to clang-tidy
 --
 
-- The 'misc-misplaced-widening-cast' check was renamed to 
`bugprone-misplaced-widening-cast
-  
`_
-
-- The 'misc-lambda-function-name' check was renamed to 
`bugprone-lambda-function-name
-  
`_
-
-- The 'misc-macro-repeated-side-effects' check was renamed to 
`bugprone-macro-repeated-side-effects
-  
`_
-
-- The 'misc-forwarding-reference-overload' check was renamed to 
`bugprone-forwarding-reference-overload
-  
`_
-
-- The 'misc-incorrect-roundings' check was renamed to 
`bugprone-incorrect-roundings
-  
`_
+- New `bugprone-throw-keyword-missing
+  
`_
 check
 
-- The 'misc-string-compare' check was renamed to `readability-string-compare
-  
`_
+  Diagnoses when a temporary object that appears to be an exception is
+  constructed but not thrown.
 
 - New `cppcoreguidelines-avoid-goto
   
`_
 check
@@ -90,17 +78,23 @@ Improvements to clang-tidy
 - New `fuchsia-statically-constructed-objects
   
`_
 check
 
-  Warns if global, non-trivial objects with static storage are constructed, 
unless the 
-  object is statically initialized with a ``constexpr`` constructor or has no 
-  explicit constructor.
+  Warns if global, non-trivial objects with static storage are constructed,
+  unless the object is statically initialized with a ``constexpr`` constructor
+  or has no explicit constructor.
   
 - New `fuchsia-trailing-return
   
`_ 
check
 
   Functions that have trailing returns are disallowed, except for those 
-  using decltype specifiers and lambda with otherwise unutterable 
+  using ``decltype`` specifiers and lambda with otherwise unutterable 
   return types.
 
+- New `modernize-use-uncaught-exceptions
+  
`_
 check
+
+  Finds and replaces deprecated uses of ``std::uncaught_exception`` to
+  ``std::uncaught_exceptions``.
+
 - New `readability-simd-intrinsics
   
`_
 check
 
@@ -112,15 +106,23 @@ Improvements to clang-tidy
   `cppcoreguidelines-avoid-goto 
`_
   added.
 
-- New `bugprone-throw-keyword-missing
-  
`_
 check
+- The 'misc-forwarding-reference-overload' check was renamed to 
`bugprone-forwarding-reference-overload
+  
`_
 
-  Diagnoses when a temporary object that appears to be an exception is 
constructed but not thrown.
+- The 'misc-incorrect-roundings' check was renamed to 
`bugprone-incorrect-roundings
+  
`_
 
-- New `modernize-use-uncaught-exceptions
-  
`_
 check
+- The 'misc-lambda-function-name' check was renamed to 
`bugprone-lambda-function-name
+  


r326519 - [StaticAnalyzer] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC).

2018-03-01 Thread Eugene Zelenko via cfe-commits
Author: eugenezelenko
Date: Thu Mar  1 16:54:51 2018
New Revision: 326519

URL: http://llvm.org/viewvc/llvm-project?rev=326519&view=rev
Log:
[StaticAnalyzer] Fix some Clang-tidy modernize and Include What You Use 
warnings; other minor fixes (NFC).

Modified:
cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h
cfe/trunk/lib/StaticAnalyzer/Core/ExprEngine.cpp

Modified: cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h?rev=326519&r1=326518&r2=326519&view=diff
==
--- cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h 
(original)
+++ cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h Thu 
Mar  1 16:54:51 2018
@@ -1,4 +1,4 @@
-//===-- ExprEngine.h - Path-Sensitive Expression-Level Dataflow ---*- C++ 
-*-=//
+//===- ExprEngine.h - Path-Sensitive Expression-Level Dataflow --*- C++ 
-*-===//
 //
 // The LLVM Compiler Infrastructure
 //
@@ -18,36 +18,68 @@
 
 #include "clang/AST/Expr.h"
 #include "clang/AST/Type.h"
+#include "clang/Analysis/CFG.h"
 #include "clang/Analysis/DomainSpecific/ObjCNoReturn.h"
+#include "clang/Analysis/ProgramPoint.h"
+#include "clang/Basic/LLVM.h"
 #include "clang/StaticAnalyzer/Core/BugReporter/BugReporter.h"
 #include "clang/StaticAnalyzer/Core/PathSensitive/AnalysisManager.h"
 #include "clang/StaticAnalyzer/Core/PathSensitive/CoreEngine.h"
+#include "clang/StaticAnalyzer/Core/PathSensitive/FunctionSummary.h"
 #include "clang/StaticAnalyzer/Core/PathSensitive/ProgramState.h"
 #include "clang/StaticAnalyzer/Core/PathSensitive/ProgramStateTrait.h"
+#include "clang/StaticAnalyzer/Core/PathSensitive/ProgramState_Fwd.h"
+#include "clang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h"
+#include "clang/StaticAnalyzer/Core/PathSensitive/SVals.h"
 #include "clang/StaticAnalyzer/Core/PathSensitive/SubEngine.h"
+#include "clang/StaticAnalyzer/Core/PathSensitive/WorkList.h"
+#include "llvm/ADT/ArrayRef.h"
+#include 
+#include 
 
 namespace clang {
 
 class AnalysisDeclContextManager;
+class AnalyzerOptions;
+class ASTContext;
+class ConstructionContext;
+class CXXBindTemporaryExpr;
 class CXXCatchStmt;
 class CXXConstructExpr;
 class CXXDeleteExpr;
 class CXXNewExpr;
-class CXXTemporaryObjectExpr;
 class CXXThisExpr;
+class Decl;
+class DeclStmt;
+class GCCAsmStmt;
+class LambdaExpr;
+class LocationContext;
 class MaterializeTemporaryExpr;
+class MSAsmStmt;
+class NamedDecl;
 class ObjCAtSynchronizedStmt;
 class ObjCForCollectionStmt;
+class ObjCIvarRefExpr;
+class ObjCMessageExpr;
+class ReturnStmt;
+class Stmt;
 
 namespace cross_tu {
+
 class CrossTranslationUnitContext;
-}
+
+} // namespace cross_tu
   
 namespace ento {
 
-class AnalysisManager;
+class BasicValueFactory;
 class CallEvent;
-class CXXConstructorCall;
+class CheckerManager;
+class ConstraintManager;
+class CXXTempObjectRegion;
+class MemRegion;
+class RegionAndSymbolInvalidationTraits;
+class SymbolManager;
 
 class ExprEngine : public SubEngine {
 public:
@@ -55,6 +87,7 @@ public:
   enum InliningModes {
 /// Follow the default settings for inlining callees.
 Inline_Regular = 0,
+
 /// Do minimal inlining of callees.
 Inline_Minimal = 0x1
   };
@@ -64,11 +97,14 @@ public:
 /// This call is a constructor or a destructor for which we do not 
currently
 /// compute the this-region correctly.
 bool IsCtorOrDtorWithImproperlyModeledTargetRegion = false;
+
 /// This call is a constructor or a destructor for a single element within
 /// an array, a part of array construction or destruction.
 bool IsArrayCtorOrDtor = false;
+
 /// This call is a constructor or a destructor of a temporary value.
 bool IsTemporaryCtorOrDtor = false;
+
 /// This call is a constructor for a temporary that is lifetime-extended
 /// by binding a smaller object within it to a reference, for example
 /// 'const int &x = C().x;'.
@@ -87,19 +123,19 @@ private:
   CoreEngine Engine;
 
   /// G - the simulation graph.
-  ExplodedGraph& G;
+  ExplodedGraph &G;
 
   /// StateMgr - Object that manages the data for all created states.
   ProgramStateManager StateMgr;
 
   /// SymMgr - Object that manages the symbol information.
-  SymbolManager& SymMgr;
+  SymbolManager &SymMgr;
 
   /// svalBuilder - SValBuilder object that creates SVals from expressions.
   SValBuilder &svalBuilder;
 
-  unsigned int currStmtIdx;
-  const NodeBuilderContext *currBldrCtx;
+  unsigned int currStmtIdx = 0;
+  const NodeBuilderContext *currBldrCtx = nullptr;
   
   /// Helper object to determine if an Objective-C message expression
   /// implicitly never returns.
@@ -153,7 +189,7 @@ public:
 
   SValBuilder &getSValBuilder() { return svalBuilder; }
 
-  BugReporter& getBugReporter() { return BR; }
+  BugReporter &getBugReporter() { r

r326633 - [StaticAnalyzer] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC).

2018-03-02 Thread Eugene Zelenko via cfe-commits
Author: eugenezelenko
Date: Fri Mar  2 15:11:49 2018
New Revision: 326633

URL: http://llvm.org/viewvc/llvm-project?rev=326633&view=rev
Log:
[StaticAnalyzer] Fix some Clang-tidy modernize and Include What You Use 
warnings; other minor fixes (NFC).

Modified:

cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/BasicValueFactory.h
cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/CoreEngine.h
cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/Store.h
cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/StoreRef.h
cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/SymExpr.h
cfe/trunk/lib/StaticAnalyzer/Core/BasicValueFactory.cpp
cfe/trunk/lib/StaticAnalyzer/Core/CoreEngine.cpp
cfe/trunk/lib/StaticAnalyzer/Core/Store.cpp

Modified: 
cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/BasicValueFactory.h
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/BasicValueFactory.h?rev=326633&r1=326632&r2=326633&view=diff
==
--- 
cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/BasicValueFactory.h 
(original)
+++ 
cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/BasicValueFactory.h 
Fri Mar  2 15:11:49 2018
@@ -1,4 +1,4 @@
-//=== BasicValueFactory.h - Basic values for Path Sens analysis --*- C++ 
-*---//
+//==- BasicValueFactory.h - Basic values for Path Sens analysis --*- C++ 
-*-==//
 //
 // The LLVM Compiler Infrastructure
 //
@@ -17,12 +17,26 @@
 #define LLVM_CLANG_STATICANALYZER_CORE_PATHSENSITIVE_BASICVALUEFACTORY_H
 
 #include "clang/AST/ASTContext.h"
+#include "clang/AST/Expr.h"
+#include "clang/AST/Type.h"
 #include "clang/StaticAnalyzer/Core/PathSensitive/APSIntType.h"
 #include "clang/StaticAnalyzer/Core/PathSensitive/SVals.h"
 #include "clang/StaticAnalyzer/Core/PathSensitive/StoreRef.h"
 #include "clang/StaticAnalyzer/Core/PathSensitive/MemRegion.h"
+#include "llvm/ADT/APSInt.h"
+#include "llvm/ADT/FoldingSet.h"
+#include "llvm/ADT/ImmutableList.h"
+#include "llvm/ADT/iterator_range.h"
+#include "llvm/Support/Allocator.h"
+#include 
+#include 
+#include 
 
 namespace clang {
+
+class CXXBaseSpecifier;
+class DeclaratorDecl;
+
 namespace ento {
 
 class CompoundValData : public llvm::FoldingSetNode {
@@ -34,7 +48,8 @@ public:
 assert(NonLoc::isCompoundType(t));
   }
 
-  typedef llvm::ImmutableList::iterator iterator;
+  using iterator = llvm::ImmutableList::iterator;
+
   iterator begin() const { return L.begin(); }
   iterator end() const { return L.end(); }
 
@@ -47,6 +62,7 @@ public:
 class LazyCompoundValData : public llvm::FoldingSetNode {
   StoreRef store;
   const TypedValueRegion *region;
+
 public:
   LazyCompoundValData(const StoreRef &st, const TypedValueRegion *r)
   : store(st), region(r) {
@@ -63,16 +79,17 @@ public:
   void Profile(llvm::FoldingSetNodeID& ID) { Profile(ID, store, region); }
 };
 
-class PointerToMemberData: public llvm::FoldingSetNode {
+class PointerToMemberData : public llvm::FoldingSetNode {
   const DeclaratorDecl *D;
   llvm::ImmutableList L;
 
 public:
   PointerToMemberData(const DeclaratorDecl *D,
   llvm::ImmutableList L)
-: D(D), L(L) {}
+  : D(D), L(L) {}
+
+  using iterator = llvm::ImmutableList::iterator;
 
-  typedef llvm::ImmutableList::iterator iterator;
   iterator begin() const { return L.begin(); }
   iterator end() const { return L.end(); }
 
@@ -81,24 +98,25 @@ public:
 
   void Profile(llvm::FoldingSetNodeID& ID) { Profile(ID, D, L); }
   const DeclaratorDecl *getDeclaratorDecl() const {return D;}
+
   llvm::ImmutableList getCXXBaseList() const {
 return L;
   }
 };
 
 class BasicValueFactory {
-  typedef llvm::FoldingSet >
-  APSIntSetTy;
+  using APSIntSetTy =
+  llvm::FoldingSet>;
 
   ASTContext &Ctx;
   llvm::BumpPtrAllocator& BPAlloc;
 
-  APSIntSetTy   APSIntSet;
-  void *PersistentSVals;
-  void *PersistentSValPairs;
+  APSIntSetTy APSIntSet;
+  void *PersistentSVals = nullptr;
+  void *PersistentSValPairs = nullptr;
 
   llvm::ImmutableList::Factory SValListFactory;
-  llvm::ImmutableList::Factory CXXBaseListFactory;
+  llvm::ImmutableList::Factory CXXBaseListFactory;
   llvm::FoldingSet  CompoundValDataSet;
   llvm::FoldingSet LazyCompoundValDataSet;
   llvm::FoldingSet PointerToMemberDataSet;
@@ -109,9 +127,8 @@ class BasicValueFactory {
 
 public:
   BasicValueFactory(ASTContext &ctx, llvm::BumpPtrAllocator &Alloc)
-: Ctx(ctx), BPAlloc(Alloc), PersistentSVals(nullptr),
-  PersistentSValPairs(nullptr), SValListFactory(Alloc),
-  CXXBaseListFactory(Alloc) {}
+  : Ctx(ctx), BPAlloc(Alloc), SValListFactory(Alloc),
+CXXBaseListFactory(Alloc) {}
 
   ~BasicValueFactory();
 
@@ -147,57 +164,57 @@ public:
 return getValue(TargetType.convert(From));
   }
 
-  const llvm::APSInt& getIntValue(uint64_t X, bool isUnsigned) {
+ 

r326757 - [StaticAnalyzer] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC).

2018-03-05 Thread Eugene Zelenko via cfe-commits
Author: eugenezelenko
Date: Mon Mar  5 16:47:41 2018
New Revision: 326757

URL: http://llvm.org/viewvc/llvm-project?rev=326757&view=rev
Log:
[StaticAnalyzer] Fix some Clang-tidy modernize and Include What You Use 
warnings; other minor fixes (NFC).

Modified:

cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/ProgramStateTrait.h
cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h
cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/SVals.h
cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/SymbolManager.h
cfe/trunk/lib/StaticAnalyzer/Core/SValBuilder.cpp
cfe/trunk/lib/StaticAnalyzer/Core/SVals.cpp
cfe/trunk/lib/StaticAnalyzer/Core/SymbolManager.cpp

Modified: 
cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/ProgramStateTrait.h
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/ProgramStateTrait.h?rev=326757&r1=326756&r2=326757&view=diff
==
--- 
cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/ProgramStateTrait.h 
(original)
+++ 
cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/ProgramStateTrait.h 
Mon Mar  5 16:47:41 2018
@@ -14,33 +14,28 @@
 //
 
//===--===//
 
-
 #ifndef LLVM_CLANG_STATICANALYZER_CORE_PATHSENSITIVE_PROGRAMSTATETRAIT_H
 #define LLVM_CLANG_STATICANALYZER_CORE_PATHSENSITIVE_PROGRAMSTATETRAIT_H
 
+#include "llvm/ADT/ImmutableList.h"
+#include "llvm/ADT/ImmutableMap.h"
+#include "llvm/ADT/ImmutableSet.h"
 #include "llvm/Support/Allocator.h"
-#include "llvm/Support/DataTypes.h"
-
-namespace llvm {
-  template  class ImmutableMap;
-  template  class ImmutableSet;
-  template  class ImmutableList;
-  template  class ImmutableListImpl;
-}
+#include 
 
 namespace clang {
-
 namespace ento {
+
   template  struct ProgramStatePartialTrait;
 
   /// Declares a program state trait for type \p Type called \p Name, and
-  /// introduce a typedef named \c NameTy.
+  /// introduce a type named \c NameTy.
   /// The macro should not be used inside namespaces, or for traits that must
   /// be accessible from more than one translation unit.
   #define REGISTER_TRAIT_WITH_PROGRAMSTATE(Name, Type) \
 namespace { \
   class Name {}; \
-  typedef Type Name ## Ty; \
+  using Name ## Ty = Type; \
 } \
 namespace clang { \
 namespace ento { \
@@ -52,28 +47,30 @@ namespace ento {
 } \
 }
 
-
   // Partial-specialization for ImmutableMap.
-
   template 
-  struct ProgramStatePartialTrait< llvm::ImmutableMap > {
-typedef llvm::ImmutableMap data_type;
-typedef typename data_type::Factory&  context_type;
-typedef Key   key_type;
-typedef Data  value_type;
-typedef const value_type* lookup_type;
+  struct ProgramStatePartialTrait> {
+using data_type = llvm::ImmutableMap;
+using context_type = typename data_type::Factory &;
+using key_type = Key;
+using value_type = Data;
+using lookup_type = const value_type *;
 
-static inline data_type MakeData(void *const* p) {
-  return p ? data_type((typename data_type::TreeTy*) *p)
+static data_type MakeData(void *const *p) {
+  return p ? data_type((typename data_type::TreeTy *) *p)
: data_type(nullptr);
 }
-static inline void *MakeVoidPtr(data_type B) {
+
+static void *MakeVoidPtr(data_type B) {
   return B.getRoot();
 }
+
 static lookup_type Lookup(data_type B, key_type K) {
   return B.lookup(K);
 }
-static data_type Set(data_type B, key_type K, value_type E,context_type F){
+
+static data_type Set(data_type B, key_type K, value_type E,
+ context_type F) {
   return F.add(B, K, E);
 }
 
@@ -85,8 +82,8 @@ namespace ento {
   return B.contains(K);
 }
 
-static inline context_type MakeContext(void *p) {
-  return *((typename data_type::Factory*) p);
+static context_type MakeContext(void *p) {
+  return *((typename data_type::Factory *) p);
 }
 
 static void *CreateContext(llvm::BumpPtrAllocator& Alloc) {
@@ -94,7 +91,7 @@ namespace ento {
 }
 
 static void DeleteContext(void *Ctx) {
-  delete (typename data_type::Factory*) Ctx;
+  delete (typename data_type::Factory *) Ctx;
 }
   };
 
@@ -107,21 +104,19 @@ namespace ento {
   /// can deal with.
   #define CLANG_ENTO_PROGRAMSTATE_MAP(Key, Value) llvm::ImmutableMap
 
-
   // Partial-specialization for ImmutableSet.
-
   template 
-  struct ProgramStatePartialTrait< llvm::ImmutableSet > {
-typedef llvm::ImmutableSet  data_type;
-typedef typename data_type::Factory&  context_type;
-typedef Key   key_type;
+  struct ProgramStatePartialTrait> {
+using data_type = llvm::ImmutableSet;
+using conte

r326856 - [StaticAnalyzer] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC).

2018-03-06 Thread Eugene Zelenko via cfe-commits
Author: eugenezelenko
Date: Tue Mar  6 16:17:48 2018
New Revision: 326856

URL: http://llvm.org/viewvc/llvm-project?rev=326856&view=rev
Log:
[StaticAnalyzer] Fix some Clang-tidy modernize and Include What You Use 
warnings; other minor fixes (NFC).

Modified:
cfe/trunk/include/clang/StaticAnalyzer/Core/AnalyzerOptions.h
cfe/trunk/include/clang/StaticAnalyzer/Core/BugReporter/BugReporter.h
cfe/trunk/lib/StaticAnalyzer/Core/AnalyzerOptions.cpp
cfe/trunk/lib/StaticAnalyzer/Core/BugReporter.cpp

Modified: cfe/trunk/include/clang/StaticAnalyzer/Core/AnalyzerOptions.h
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/StaticAnalyzer/Core/AnalyzerOptions.h?rev=326856&r1=326855&r2=326856&view=diff
==
--- cfe/trunk/include/clang/StaticAnalyzer/Core/AnalyzerOptions.h (original)
+++ cfe/trunk/include/clang/StaticAnalyzer/Core/AnalyzerOptions.h Tue Mar  6 
16:17:48 2018
@@ -1,4 +1,4 @@
-//===--- AnalyzerOptions.h - Analysis Engine Options *- C++ 
-*-===//
+//===- AnalyzerOptions.h - Analysis Engine Options --*- C++ 
-*-===//
 //
 // The LLVM Compiler Infrastructure
 //
@@ -19,18 +19,18 @@
 #include "llvm/ADT/IntrusiveRefCntPtr.h"
 #include "llvm/ADT/Optional.h"
 #include "llvm/ADT/StringMap.h"
+#include "llvm/ADT/StringRef.h"
 #include 
+#include 
 #include 
 
 namespace clang {
-class ASTConsumer;
-class DiagnosticsEngine;
-class Preprocessor;
-class LangOptions;
 
 namespace ento {
+
 class CheckerBase;
-}
+
+} // namespace ento
 
 /// Analysis - Set of available source code analyses.
 enum Analyses {
@@ -123,20 +123,20 @@ enum IPAKind {
 
 class AnalyzerOptions : public RefCountedBase {
 public:
-  typedef llvm::StringMap ConfigTable;
+  using ConfigTable = llvm::StringMap;
 
   static std::vector
   getRegisteredCheckers(bool IncludeExperimental = false);
 
   /// \brief Pair of checker name and enable/disable.
-  std::vector > CheckersControlList;
+  std::vector> CheckersControlList;
   
   /// \brief A key-value table of use-specified configuration values.
   ConfigTable Config;
-  AnalysisStores AnalysisStoreOpt;
-  AnalysisConstraints AnalysisConstraintsOpt;
-  AnalysisDiagClients AnalysisDiagOpt;
-  AnalysisPurgeMode AnalysisPurgeOpt;
+  AnalysisStores AnalysisStoreOpt = RegionStoreModel;
+  AnalysisConstraints AnalysisConstraintsOpt = RangeConstraintsModel;
+  AnalysisDiagClients AnalysisDiagOpt = PD_HTML;
+  AnalysisPurgeMode AnalysisPurgeOpt = PurgeStmt;
   
   std::string AnalyzeSpecificFunction;
 
@@ -147,7 +147,6 @@ public:
   /// \brief The maximum number of times the analyzer visits a block.
   unsigned maxBlockVisitOnPath;
   
-  
   /// \brief Disable all analyzer checks.
   ///
   /// This flag allows one to disable analyzer checks on the code processed by
@@ -183,10 +182,11 @@ public:
   unsigned NoRetryExhausted : 1;
   
   /// \brief The inlining stack depth limit.
-  unsigned InlineMaxStackDepth;
+  // Cap the stack depth at 4 calls (5 stack frames, base + 4 calls).
+  unsigned InlineMaxStackDepth = 5;
   
   /// \brief The mode of function selection used during inlining.
-  AnalysisInliningMode InliningMode;
+  AnalysisInliningMode InliningMode = NoRedundancy;
 
   enum class ExplorationStrategyKind {
 DFS,
@@ -198,14 +198,15 @@ public:
   };
 
 private:
-
-  ExplorationStrategyKind ExplorationStrategy;
+  ExplorationStrategyKind ExplorationStrategy = 
ExplorationStrategyKind::NotSet;
 
   /// \brief Describes the kinds for high-level analyzer mode.
   enum UserModeKind {
 UMK_NotSet = 0,
+
 /// Perform shallow but fast analyzes.
 UMK_Shallow = 1,
+
 /// Perform deep analyzes.
 UMK_Deep = 2
   };
@@ -213,10 +214,10 @@ private:
   /// Controls the high-level analyzer mode, which influences the default 
   /// settings for some of the lower-level config options (such as IPAMode).
   /// \sa getUserMode
-  UserModeKind UserMode;
+  UserModeKind UserMode = UMK_NotSet;
 
   /// Controls the mode of inter-procedural analysis.
-  IPAKind IPAMode;
+  IPAKind IPAMode = IPAK_NotSet;
 
   /// Controls which C++ member functions will be considered for inlining.
   CXXInlineableMemberKind CXXMemberInliningMode;
@@ -345,6 +346,15 @@ private:
  bool SearchInParents = false);
 
 public:
+  AnalyzerOptions()
+  : DisableAllChecks(false), ShowCheckerHelp(false),
+ShowEnabledCheckerList(false), AnalyzeAll(false),
+AnalyzerDisplayProgress(false), AnalyzeNestedBlocks(false),
+eagerlyAssumeBinOpBifurcation(false), TrimGraph(false),
+visualizeExplodedGraphWithGraphViz(false),
+visualizeExplodedGraphWithUbiGraph(false), UnoptimizedCFG(false),
+PrintStats(false), NoRetryExhausted(false), CXXMemberInliningMode() {}
+
   /// Interprets an option's string value as a boolean. The "true" string is
   /// interpreted as true and the "false" string is interpreted as false.
 

[clang-tools-extra] r326954 - [Documentation] Fix Clang-tidy checks list broken in r326909.

2018-03-07 Thread Eugene Zelenko via cfe-commits
Author: eugenezelenko
Date: Wed Mar  7 14:30:50 2018
New Revision: 326954

URL: http://llvm.org/viewvc/llvm-project?rev=326954&view=rev
Log:
[Documentation] Fix Clang-tidy checks list broken in r326909.

Modified:
clang-tools-extra/trunk/docs/clang-tidy/checks/list.rst

Modified: clang-tools-extra/trunk/docs/clang-tidy/checks/list.rst
URL: 
http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/docs/clang-tidy/checks/list.rst?rev=326954&r1=326953&r2=326954&view=diff
==
--- clang-tools-extra/trunk/docs/clang-tidy/checks/list.rst (original)
+++ clang-tools-extra/trunk/docs/clang-tidy/checks/list.rst Wed Mar  7 14:30:50 
2018
@@ -197,6 +197,7 @@ Clang-Tidy Checks
performance-type-promotion-in-math-fn
performance-unnecessary-copy-initialization
performance-unnecessary-value-param
+   portability-simd-intrinsics
readability-avoid-const-params-in-decls
readability-braces-around-statements
readability-container-size-empty
@@ -218,7 +219,6 @@ Clang-Tidy Checks
readability-redundant-smartptr-get
readability-redundant-string-cstr
readability-redundant-string-init
-   readability-simd-intrinsics
readability-simplify-boolean-expr
readability-static-accessed-through-instance
readability-static-definition-in-anonymous-namespace


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


r326979 - [Documentation] Fix Release notes problems introduced in r326889. Add highlighting.

2018-03-07 Thread Eugene Zelenko via cfe-commits
Author: eugenezelenko
Date: Wed Mar  7 17:37:39 2018
New Revision: 326979

URL: http://llvm.org/viewvc/llvm-project?rev=326979&view=rev
Log:
[Documentation] Fix Release notes problems introduced in r326889. Add 
highlighting.

Modified:
cfe/trunk/docs/ReleaseNotes.rst

Modified: cfe/trunk/docs/ReleaseNotes.rst
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/docs/ReleaseNotes.rst?rev=326979&r1=326978&r2=326979&view=diff
==
--- cfe/trunk/docs/ReleaseNotes.rst (original)
+++ cfe/trunk/docs/ReleaseNotes.rst Wed Mar  7 17:37:39 2018
@@ -74,11 +74,12 @@ future versions of Clang.
 Modified Compiler Flags
 ---
 
-- Before Clang 7.0, we prepended the "#" character to the --autocomplete 
argument to
-enable cc1 flags. For example, when the -cc1 or -Xclang flag is in the clang 
invocation,
-the shell executed clang --autocomplete=#-. Clang 7.0 now
-requires the whole invocation including all flags to be passed to the 
--autocomplete
-like this: clang --autocomplete=-cc1,-xc++,-fsyn.
+- Before Clang 7.0, we prepended the `#` character to the `--autocomplete`
+  argument to enable cc1 flags. For example, when the `-cc1` or `-Xclang` flag
+  is in the :program:`clang` invocation, the shell executed
+  `clang --autocomplete=#-`. Clang 7.0 now requires the
+  whole invocation including all flags to be passed to the `--autocomplete` 
like
+  this: `clang --autocomplete=-cc1,-xc++,-fsyn`.
 
 New Pragmas in Clang
 ---
@@ -95,6 +96,7 @@ Attribute Changes in Clang
   sanity, however it is otherwise compatible with existing code using this
   feature for GCC. Consult the documentation for the target attribute for more
   information.
+
 - ...
 
 Windows Support


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


r327074 - [StaticAnalyzer] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC).

2018-03-08 Thread Eugene Zelenko via cfe-commits
Author: eugenezelenko
Date: Thu Mar  8 14:45:13 2018
New Revision: 327074

URL: http://llvm.org/viewvc/llvm-project?rev=327074&view=rev
Log:
[StaticAnalyzer] Fix some Clang-tidy modernize and Include What You Use 
warnings; other minor fixes (NFC).

Modified:

cfe/trunk/include/clang/StaticAnalyzer/Core/BugReporter/BugReporterVisitors.h
cfe/trunk/include/clang/StaticAnalyzer/Core/BugReporter/PathDiagnostic.h
cfe/trunk/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp
cfe/trunk/lib/StaticAnalyzer/Core/PathDiagnostic.cpp

Modified: 
cfe/trunk/include/clang/StaticAnalyzer/Core/BugReporter/BugReporterVisitors.h
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/StaticAnalyzer/Core/BugReporter/BugReporterVisitors.h?rev=327074&r1=327073&r2=327074&view=diff
==
--- 
cfe/trunk/include/clang/StaticAnalyzer/Core/BugReporter/BugReporterVisitors.h 
(original)
+++ 
cfe/trunk/include/clang/StaticAnalyzer/Core/BugReporter/BugReporterVisitors.h 
Thu Mar  8 14:45:13 2018
@@ -1,4 +1,4 @@
-//===---  BugReporterVisitors.h - Generate PathDiagnostics ---*- C++ 
-*-===//
+//===- BugReporterVisitors.h - Generate PathDiagnostics -*- C++ 
-*-===//
 //
 // The LLVM Compiler Infrastructure
 //
@@ -15,11 +15,20 @@
 #ifndef LLVM_CLANG_STATICANALYZER_CORE_BUGREPORTER_BUGREPORTERVISITORS_H
 #define LLVM_CLANG_STATICANALYZER_CORE_BUGREPORTER_BUGREPORTERVISITORS_H
 
+#include "clang/Basic/LLVM.h"
 #include "clang/StaticAnalyzer/Core/PathSensitive/SVals.h"
 #include "llvm/ADT/FoldingSet.h"
+#include "llvm/ADT/STLExtras.h"
+#include "llvm/ADT/StringRef.h"
+#include 
 
 namespace clang {
+
+class BinaryOperator;
 class CFGBlock;
+class DeclRefExpr;
+class Expr;
+class Stmt;
 
 namespace ento {
 
@@ -99,7 +108,7 @@ class FindLastStoreBRVisitor final
 : public BugReporterVisitorImpl {
   const MemRegion *R;
   SVal V;
-  bool Satisfied;
+  bool Satisfied = false;
 
   /// If the visitor is tracking the value directly responsible for the
   /// bug, we are going to employ false positive suppression.
@@ -113,10 +122,7 @@ public:
 
   FindLastStoreBRVisitor(KnownSVal V, const MemRegion *R,
  bool InEnableNullFPSuppression)
-  : R(R),
-V(V),
-Satisfied(false),
-EnableNullFPSuppression(InEnableNullFPSuppression) {}
+  : R(R), V(V), EnableNullFPSuppression(InEnableNullFPSuppression) {}
 
   void Profile(llvm::FoldingSetNodeID &ID) const override;
 
@@ -130,18 +136,17 @@ class TrackConstraintBRVisitor final
 : public BugReporterVisitorImpl {
   DefinedSVal Constraint;
   bool Assumption;
-  bool IsSatisfied;
+  bool IsSatisfied = false;
   bool IsZeroCheck;
 
   /// We should start tracking from the last node along the path in which the
   /// value is constrained.
-  bool IsTrackingTurnedOn;
+  bool IsTrackingTurnedOn = false;
 
 public:
   TrackConstraintBRVisitor(DefinedSVal constraint, bool assumption)
-  : Constraint(constraint), Assumption(assumption), IsSatisfied(false),
-IsZeroCheck(!Assumption && Constraint.getAs()),
-IsTrackingTurnedOn(false) {}
+  : Constraint(constraint), Assumption(assumption),
+IsZeroCheck(!Assumption && Constraint.getAs()) {}
 
   void Profile(llvm::FoldingSetNodeID &ID) const override;
 
@@ -157,7 +162,6 @@ public:
 private:
   /// Checks if the constraint is valid in the current state.
   bool isUnderconstrained(const ExplodedNode *N) const;
-
 };
 
 /// \class NilReceiverBRVisitor
@@ -165,7 +169,6 @@ private:
 class NilReceiverBRVisitor final
 : public BugReporterVisitorImpl {
 public:
-
   void Profile(llvm::FoldingSetNodeID &ID) const override {
 static int x = 0;
 ID.AddPointer(&x);
@@ -184,7 +187,6 @@ public:
 /// Visitor that tries to report interesting diagnostics from conditions.
 class ConditionBRVisitor final
 : public BugReporterVisitorImpl {
-
   // FIXME: constexpr initialization isn't supported by MSVC2013.
   static const char *const GenericTrueMessage;
   static const char *const GenericFalseMessage;
@@ -277,7 +279,6 @@ public:
 /// if the region's contents are not modified/accessed by the call.
 class UndefOrNullArgVisitor final
 : public BugReporterVisitorImpl {
-
   /// The interesting memory region this visitor is tracking.
   const MemRegion *R;
 
@@ -303,14 +304,14 @@ class SuppressInlineDefensiveChecksVisit
   DefinedSVal V;
 
   /// Track if we found the node where the constraint was first added.
-  bool IsSatisfied;
+  bool IsSatisfied = false;
 
   /// Since the visitors can be registered on nodes previous to the last
   /// node in the BugReport, but the path traversal always starts with the last
   /// node, the visitor invariant (that we start with a node in which V is 
null)
   /// might not hold when node visitation starts. We are going to start 
tracking
   /// from the last node in which the value is null.
-  bool IsTrackingTurnedOn;
+  bool IsTrackingTurnedOn = fal

r327453 - [Analysis] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC).

2018-03-13 Thread Eugene Zelenko via cfe-commits
Author: eugenezelenko
Date: Tue Mar 13 14:32:01 2018
New Revision: 327453

URL: http://llvm.org/viewvc/llvm-project?rev=327453&view=rev
Log:
[Analysis] Fix some Clang-tidy modernize and Include What You Use warnings; 
other minor fixes (NFC).

Modified:
cfe/trunk/include/clang/Analysis/Analyses/Consumed.h
cfe/trunk/include/clang/Analysis/Analyses/Dominators.h
cfe/trunk/include/clang/Analysis/Analyses/PostOrderCFGView.h
cfe/trunk/include/clang/Analysis/Analyses/ThreadSafetyCommon.h
cfe/trunk/lib/Analysis/Consumed.cpp
cfe/trunk/lib/Analysis/Dominators.cpp
cfe/trunk/lib/Analysis/PostOrderCFGView.cpp
cfe/trunk/lib/Analysis/ThreadSafetyCommon.cpp

Modified: cfe/trunk/include/clang/Analysis/Analyses/Consumed.h
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Analysis/Analyses/Consumed.h?rev=327453&r1=327452&r2=327453&view=diff
==
--- cfe/trunk/include/clang/Analysis/Analyses/Consumed.h (original)
+++ cfe/trunk/include/clang/Analysis/Analyses/Consumed.h Tue Mar 13 14:32:01 
2018
@@ -1,4 +1,4 @@
-//===- Consumed.h --*- C++ 
--*-===//
+//===- Consumed.h ---*- C++ 
-*-===//
 //
 // The LLVM Compiler Infrastructure
 //
@@ -15,16 +15,32 @@
 #ifndef LLVM_CLANG_ANALYSIS_ANALYSES_CONSUMED_H
 #define LLVM_CLANG_ANALYSIS_ANALYSES_CONSUMED_H
 
-#include "clang/AST/DeclCXX.h"
-#include "clang/AST/ExprCXX.h"
-#include "clang/AST/StmtCXX.h"
 #include "clang/Analysis/Analyses/PostOrderCFGView.h"
-#include "clang/Analysis/AnalysisDeclContext.h"
+#include "clang/Analysis/CFG.h"
+#include "clang/Basic/LLVM.h"
+#include "clang/Basic/PartialDiagnostic.h"
 #include "clang/Basic/SourceLocation.h"
+#include "llvm/ADT/DenseMap.h"
+#include "llvm/ADT/SmallVector.h"
+#include "llvm/ADT/StringRef.h"
+#include 
+#include 
+#include 
+#include 
 
 namespace clang {
+
+class AnalysisDeclContext;
+class CXXBindTemporaryExpr;
+class FunctionDecl;
+class PostOrderCFGView;
+class Stmt;
+class VarDecl;
+
 namespace consumed {
   
+  class ConsumedStmtVisitor;
+
   enum ConsumedState {
 // No state information for the given variable.
 CS_None,
@@ -34,16 +50,12 @@ namespace consumed {
 CS_Consumed
   };
   
-  class ConsumedStmtVisitor;
-  
-  typedef SmallVector OptionalNotes;
-  typedef std::pair DelayedDiag;
-  typedef std::list DiagList;
+  using OptionalNotes = SmallVector;
+  using DelayedDiag = std::pair;
+  using DiagList = std::list;
 
   class ConsumedWarningsHandlerBase {
-
   public:
-
 virtual ~ConsumedWarningsHandlerBase();
 
 /// \brief Emit the warnings and notes left by the analysis.
@@ -129,23 +141,21 @@ namespace consumed {
   };
 
   class ConsumedStateMap {
-
-typedef llvm::DenseMap VarMapType;
-typedef llvm::DenseMap
-TmpMapType;
+using VarMapType = llvm::DenseMap;
+using TmpMapType =
+llvm::DenseMap;
 
   protected:
-
-bool Reachable;
-const Stmt *From;
+bool Reachable = true;
+const Stmt *From = nullptr;
 VarMapType VarMap;
 TmpMapType TmpMap;
 
   public:
-ConsumedStateMap() : Reachable(true), From(nullptr) {}
+ConsumedStateMap() = default;
 ConsumedStateMap(const ConsumedStateMap &Other)
-  : Reachable(Other.Reachable), From(Other.From), VarMap(Other.VarMap),
-TmpMap() {}
+: Reachable(Other.Reachable), From(Other.From), VarMap(Other.VarMap),
+  TmpMap() {}
 
 /// \brief Warn if any of the parameters being tracked are not in the state
 /// they were declared to be in upon return from a function.
@@ -205,10 +215,8 @@ namespace consumed {
 ConsumedBlockInfo(unsigned int NumBlocks, PostOrderCFGView *SortedGraph)
 : StateMapsArray(NumBlocks), VisitOrder(NumBlocks, 0) {
   unsigned int VisitOrderCounter = 0;
-  for (PostOrderCFGView::iterator BI = SortedGraph->begin(),
-   BE = SortedGraph->end(); BI != BE; ++BI) {
-VisitOrder[(*BI)->getBlockID()] = VisitOrderCounter++;
-  }
+  for (const auto BI : *SortedGraph)
+VisitOrder[BI->getBlockID()] = VisitOrderCounter++;
 }
 
 bool allBackEdgesVisited(const CFGBlock *CurrBlock,
@@ -231,7 +239,6 @@ namespace consumed {
 
   /// A class that handles the analysis of uniqueness violations.
   class ConsumedAnalyzer {
-
 ConsumedBlockInfo BlockInfo;
 std::unique_ptr CurrStates;
 
@@ -243,7 +250,6 @@ namespace consumed {
 const ConsumedStmtVisitor &Visitor);
 
   public:
-
 ConsumedWarningsHandlerBase &WarningsHandler;
 
 ConsumedAnalyzer(ConsumedWarningsHandlerBase &WarningsHandler)
@@ -259,6 +265,9 @@ namespace consumed {
 /// exactly once.
 void run(AnalysisDeclContext &AC);
   };
-}} // end namespace clang::consumed
 
-#endif
+} // namespace consumed
+
+} // namespace clang
+
+#endif // LLVM_CLANG

r327573 - [Tooling] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC).

2018-03-14 Thread Eugene Zelenko via cfe-commits
Author: eugenezelenko
Date: Wed Mar 14 14:05:51 2018
New Revision: 327573

URL: http://llvm.org/viewvc/llvm-project?rev=327573&view=rev
Log:
[Tooling] Fix some Clang-tidy modernize and Include What You Use warnings; 
other minor fixes (NFC).

Modified:
cfe/trunk/include/clang/Tooling/ArgumentsAdjusters.h
cfe/trunk/include/clang/Tooling/CompilationDatabase.h
cfe/trunk/include/clang/Tooling/CompilationDatabasePluginRegistry.h
cfe/trunk/include/clang/Tooling/Core/Replacement.h
cfe/trunk/include/clang/Tooling/FileMatchTrie.h
cfe/trunk/include/clang/Tooling/JSONCompilationDatabase.h
cfe/trunk/include/clang/Tooling/ToolExecutorPluginRegistry.h
cfe/trunk/include/clang/Tooling/Tooling.h
cfe/trunk/lib/Tooling/ArgumentsAdjusters.cpp
cfe/trunk/lib/Tooling/CompilationDatabase.cpp
cfe/trunk/lib/Tooling/Core/Replacement.cpp
cfe/trunk/lib/Tooling/FileMatchTrie.cpp
cfe/trunk/lib/Tooling/JSONCompilationDatabase.cpp
cfe/trunk/lib/Tooling/Tooling.cpp

Modified: cfe/trunk/include/clang/Tooling/ArgumentsAdjusters.h
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Tooling/ArgumentsAdjusters.h?rev=327573&r1=327572&r2=327573&view=diff
==
--- cfe/trunk/include/clang/Tooling/ArgumentsAdjusters.h (original)
+++ cfe/trunk/include/clang/Tooling/ArgumentsAdjusters.h Wed Mar 14 14:05:51 
2018
@@ -1,4 +1,4 @@
-//===--- ArgumentsAdjusters.h - Command line arguments adjuster -*- C++ 
-*-===//
+//===- ArgumentsAdjusters.h - Command line arguments adjuster ---*- C++ 
-*-===//
 //
 // The LLVM Compiler Infrastructure
 //
@@ -7,7 +7,7 @@
 //
 
//===--===//
 //
-// This file declares typedef ArgumentsAdjuster and functions to create several
+// This file declares type ArgumentsAdjuster and functions to create several
 // useful argument adjusters.
 // ArgumentsAdjusters modify command line arguments obtained from a compilation
 // database before they are used to run a frontend action.
@@ -27,14 +27,14 @@ namespace clang {
 namespace tooling {
 
 /// \brief A sequence of command line arguments.
-typedef std::vector CommandLineArguments;
+using CommandLineArguments = std::vector;
 
 /// \brief A prototype of a command line adjuster.
 ///
 /// Command line argument adjuster is responsible for command line arguments
 /// modification before the arguments are used to run a frontend action.
-typedef std::function ArgumentsAdjuster;
+using ArgumentsAdjuster = std::function;
 
 /// \brief Gets an argument adjuster that converts input command line arguments
 /// to the "syntax check only" variant.
@@ -70,4 +70,3 @@ ArgumentsAdjuster combineAdjusters(Argum
 } // namespace clang
 
 #endif // LLVM_CLANG_TOOLING_ARGUMENTSADJUSTERS_H
-

Modified: cfe/trunk/include/clang/Tooling/CompilationDatabase.h
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Tooling/CompilationDatabase.h?rev=327573&r1=327572&r2=327573&view=diff
==
--- cfe/trunk/include/clang/Tooling/CompilationDatabase.h (original)
+++ cfe/trunk/include/clang/Tooling/CompilationDatabase.h Wed Mar 14 14:05:51 
2018
@@ -1,4 +1,4 @@
-//===--- CompilationDatabase.h - *- C++ 
-*-===//
+//===- CompilationDatabase.h *- C++ 
-*-===//
 //
 // The LLVM Compiler Infrastructure
 //
@@ -34,6 +34,7 @@
 #include "llvm/ADT/Twine.h"
 #include 
 #include 
+#include 
 #include 
 
 namespace clang {
@@ -41,13 +42,11 @@ namespace tooling {
 
 /// \brief Specifies the working directory and command of a compilation.
 struct CompileCommand {
-  CompileCommand() {}
+  CompileCommand() = default;
   CompileCommand(Twine Directory, Twine Filename,
  std::vector CommandLine, Twine Output)
-  : Directory(Directory.str()),
-Filename(Filename.str()),
-CommandLine(std::move(CommandLine)),
-Output(Output.str()){}
+  : Directory(Directory.str()), Filename(Filename.str()),
+CommandLine(std::move(CommandLine)), Output(Output.str()){}
 
   /// \brief The working directory the command was executed from.
   std::string Directory;
@@ -113,7 +112,7 @@ public:
   /// A compilation database representing the project would return both command
   /// lines for a.cc and b.cc and only the first command line for t.cc.
   virtual std::vector getCompileCommands(
-StringRef FilePath) const = 0;
+  StringRef FilePath) const = 0;
 
   /// \brief Returns the list of all files available in the compilation 
database.
   ///
@@ -214,7 +213,7 @@ private:
   std::vector CompileCommands;
 };
 
-} // end namespace tooling
-} // end namespace clang
+} // namespace tooling
+} // namespace clang
 
-#endif
+#endif // LLVM_CLANG_TOOLING_COMPILATIONDATABASE_H

Modified: cfe/trunk/include/clang/T

r327687 - [Analysis] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC).

2018-03-15 Thread Eugene Zelenko via cfe-commits
Author: eugenezelenko
Date: Thu Mar 15 17:37:51 2018
New Revision: 327687

URL: http://llvm.org/viewvc/llvm-project?rev=327687&view=rev
Log:
[Analysis] Fix some Clang-tidy modernize and Include What You Use warnings; 
other minor fixes (NFC).

Modified:
cfe/trunk/include/clang/Analysis/Analyses/ThreadSafetyTIL.h
cfe/trunk/include/clang/Analysis/Analyses/ThreadSafetyUtil.h
cfe/trunk/lib/Analysis/ThreadSafetyTIL.cpp

Modified: cfe/trunk/include/clang/Analysis/Analyses/ThreadSafetyTIL.h
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Analysis/Analyses/ThreadSafetyTIL.h?rev=327687&r1=327686&r2=327687&view=diff
==
--- cfe/trunk/include/clang/Analysis/Analyses/ThreadSafetyTIL.h (original)
+++ cfe/trunk/include/clang/Analysis/Analyses/ThreadSafetyTIL.h Thu Mar 15 
17:37:51 2018
@@ -1,4 +1,4 @@
-//===- ThreadSafetyTIL.h ---*- C++ 
--*-===//
+//===- ThreadSafetyTIL.h *- C++ 
-*-===//
 //
 // The LLVM Compiler Infrastructure
 //
@@ -47,20 +47,33 @@
 #ifndef LLVM_CLANG_ANALYSIS_ANALYSES_THREADSAFETYTIL_H
 #define LLVM_CLANG_ANALYSIS_ANALYSES_THREADSAFETYTIL_H
 
-// All clang include dependencies for this file must be put in
-// ThreadSafetyUtil.h.
-#include "ThreadSafetyUtil.h"
+#include "clang/AST/Decl.h"
+#include "clang/Analysis/Analyses/ThreadSafetyUtil.h"
+#include "clang/Basic/LLVM.h"
+#include "llvm/ADT/ArrayRef.h"
+#include "llvm/ADT/None.h"
+#include "llvm/ADT/Optional.h"
+#include "llvm/ADT/StringRef.h"
+#include "llvm/Support/Casting.h"
+#include "llvm/Support/raw_ostream.h"
 #include 
 #include 
 #include 
-#include 
+#include 
+#include 
+#include 
 #include 
 
-
 namespace clang {
+
+class CallExpr;
+class Expr;
+class Stmt;
+
 namespace threadSafety {
 namespace til {
 
+class BasicBlock;
 
 /// Enum for the different distinct classes of SExpr
 enum TIL_Opcode {
@@ -100,11 +113,21 @@ enum TIL_BinaryOpcode : unsigned char {
 /// Opcode for cast operations.
 enum TIL_CastOpcode : unsigned char {
   CAST_none = 0,
-  CAST_extendNum,   // extend precision of numeric type
-  CAST_truncNum,// truncate precision of numeric type
-  CAST_toFloat, // convert to floating point type
-  CAST_toInt,   // convert to integer type
-  CAST_objToPtr // convert smart pointer to pointer  (C++ only)
+
+  // Extend precision of numeric type
+  CAST_extendNum,
+
+  // Truncate precision of numeric type
+  CAST_truncNum,
+
+  // Convert to floating point type
+  CAST_toFloat,
+
+  // Convert to integer type
+  CAST_toInt,
+
+  // Convert smart pointer to pointer (C++ only)
+  CAST_objToPtr
 };
 
 const TIL_Opcode   COP_Min  = COP_Future;
@@ -122,7 +145,6 @@ StringRef getUnaryOpcodeString(TIL_Unary
 /// Return the name of a binary opcode.
 StringRef getBinaryOpcodeString(TIL_BinaryOpcode Op);
 
-
 /// ValueTypes are data types that can actually be held in registers.
 /// All variables and expressions must have a value type.
 /// Pointer types are further subdivided into the various heap-allocated
@@ -150,22 +172,22 @@ struct ValueType {
 ST_128
   };
 
+  ValueType(BaseType B, SizeType Sz, bool S, unsigned char VS)
+  : Base(B), Size(Sz), Signed(S), VectSize(VS) {}
+
   inline static SizeType getSizeType(unsigned nbytes);
 
   template 
   inline static ValueType getValueType();
 
-  ValueType(BaseType B, SizeType Sz, bool S, unsigned char VS)
-  : Base(B), Size(Sz), Signed(S), VectSize(VS)
-  { }
+  BaseType Base;
+  SizeType Size;
+  bool Signed;
 
-  BaseType  Base;
-  SizeType  Size;
-  bool  Signed;
-  unsigned char VectSize;  // 0 for scalar, otherwise num elements in vector
+  // 0 for scalar, otherwise num elements in vector
+  unsigned char VectSize;
 };
 
-
 inline ValueType::SizeType ValueType::getSizeType(unsigned nbytes) {
   switch (nbytes) {
 case 1: return ST_8;
@@ -177,7 +199,6 @@ inline ValueType::SizeType ValueType::ge
   }
 }
 
-
 template<>
 inline ValueType ValueType::getValueType() {
   return ValueType(BT_Void, ST_0, false, 0);
@@ -253,13 +274,11 @@ inline ValueType ValueType::getValueType
   return ValueType(BT_Pointer, getSizeType(sizeof(void*)), false, 0);
 }
 
-
-class BasicBlock;
-
-
 /// Base class for AST nodes in the typed intermediate language.
 class SExpr {
 public:
+  SExpr() = delete;
+
   TIL_Opcode opcode() const { return static_cast(Opcode); }
 
   // Subclasses of SExpr must define the following:
@@ -280,6 +299,9 @@ public:
 return ::operator new(S, R);
   }
 
+  /// SExpr objects must be created in an arena.
+  void *operator new(size_t) = delete;
+
   /// SExpr objects cannot be deleted.
   // This declaration is public to workaround a gcc bug that breaks building
   // with REQUIRES_EH=1.
@@ -291,45 +313,33 @@ public:
 
   /// Returns the block, if this is an instruction in a basic block,
   /// otherwise returns null.
-  BasicBloc

r327746 - [Analysis] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC).

2018-03-16 Thread Eugene Zelenko via cfe-commits
Author: eugenezelenko
Date: Fri Mar 16 14:22:42 2018
New Revision: 327746

URL: http://llvm.org/viewvc/llvm-project?rev=327746&view=rev
Log:
[Analysis] Fix some Clang-tidy modernize and Include What You Use warnings; 
other minor fixes (NFC).

Modified:
cfe/trunk/include/clang/Analysis/Analyses/CFGReachabilityAnalysis.h
cfe/trunk/include/clang/Analysis/Analyses/ThreadSafety.h
cfe/trunk/lib/Analysis/CFGReachabilityAnalysis.cpp
cfe/trunk/lib/Analysis/ThreadSafety.cpp

Modified: cfe/trunk/include/clang/Analysis/Analyses/CFGReachabilityAnalysis.h
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Analysis/Analyses/CFGReachabilityAnalysis.h?rev=327746&r1=327745&r2=327746&view=diff
==
--- cfe/trunk/include/clang/Analysis/Analyses/CFGReachabilityAnalysis.h 
(original)
+++ cfe/trunk/include/clang/Analysis/Analyses/CFGReachabilityAnalysis.h Fri Mar 
16 14:22:42 2018
@@ -1,4 +1,4 @@
-//==- CFGReachabilityAnalysis.h - Basic reachability analysis *- C++ 
-*-==//
+//===- CFGReachabilityAnalysis.h - Basic reachability analysis --*- C++ 
-*-===//
 //
 // The LLVM Compiler Infrastructure
 //
@@ -30,10 +30,12 @@ class CFGBlock;
 // from the destination node and cache the results to prevent work
 // duplication.
 class CFGReverseBlockReachabilityAnalysis {
-  typedef llvm::BitVector ReachableSet;
-  typedef llvm::DenseMap ReachableMap;
+  using ReachableSet = llvm::BitVector;
+  using ReachableMap = llvm::DenseMap;
+
   ReachableSet analyzed;
   ReachableMap reachable;
+
 public:
   CFGReverseBlockReachabilityAnalysis(const CFG &cfg);
 
@@ -44,6 +46,6 @@ private:
   void mapReachability(const CFGBlock *Dst);
 };
   
-}
+} // namespace clang
 
-#endif
+#endif // LLVM_CLANG_ANALYSIS_ANALYSES_CFGREACHABILITYANALYSIS_H

Modified: cfe/trunk/include/clang/Analysis/Analyses/ThreadSafety.h
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Analysis/Analyses/ThreadSafety.h?rev=327746&r1=327745&r2=327746&view=diff
==
--- cfe/trunk/include/clang/Analysis/Analyses/ThreadSafety.h (original)
+++ cfe/trunk/include/clang/Analysis/Analyses/ThreadSafety.h Fri Mar 16 
14:22:42 2018
@@ -1,4 +1,4 @@
-//===- ThreadSafety.h --*- C++ 
--*-===//
+//===- ThreadSafety.h ---*- C++ 
-*-===//
 //
 // The LLVM Compiler Infrastructure
 //
@@ -19,11 +19,15 @@
 #ifndef LLVM_CLANG_ANALYSIS_ANALYSES_THREADSAFETY_H
 #define LLVM_CLANG_ANALYSIS_ANALYSES_THREADSAFETY_H
 
-#include "clang/Analysis/AnalysisDeclContext.h"
 #include "clang/Basic/SourceLocation.h"
 #include "llvm/ADT/StringRef.h"
 
 namespace clang {
+
+class AnalysisDeclContext;
+class FunctionDecl;
+class NamedDecl;
+
 namespace threadSafety {
 
 class BeforeSet;
@@ -31,27 +35,44 @@ class BeforeSet;
 /// This enum distinguishes between different kinds of operations that may
 /// need to be protected by locks. We use this enum in error handling.
 enum ProtectedOperationKind {
-  POK_VarDereference, ///< Dereferencing a variable (e.g. p in *p = 5;)
-  POK_VarAccess, ///< Reading or writing a variable (e.g. x in x = 5;)
-  POK_FunctionCall, ///< Making a function call (e.g. fool())
-  POK_PassByRef, ///< Passing a guarded variable by reference.
-  POK_PtPassByRef,  ///< Passing a pt-guarded variable by reference.
+  /// Dereferencing a variable (e.g. p in *p = 5;)
+  POK_VarDereference,
+
+  /// Reading or writing a variable (e.g. x in x = 5;)
+  POK_VarAccess,
+
+  /// Making a function call (e.g. fool())
+  POK_FunctionCall,
+
+  /// Passing a guarded variable by reference.
+  POK_PassByRef,
+
+  /// Passing a pt-guarded variable by reference.
+  POK_PtPassByRef
 };
 
 /// This enum distinguishes between different kinds of lock actions. For
 /// example, it is an error to write a variable protected by shared version of 
a
 /// mutex.
 enum LockKind {
-  LK_Shared,///< Shared/reader lock of a mutex.
-  LK_Exclusive, ///< Exclusive/writer lock of a mutex.
-  LK_Generic///< Can be either Shared or Exclusive
+  /// Shared/reader lock of a mutex.
+  LK_Shared,
+
+  /// Exclusive/writer lock of a mutex.
+  LK_Exclusive,
+
+  /// Can be either Shared or Exclusive.
+  LK_Generic
 };
 
 /// This enum distinguishes between different ways to access (read or write) a
 /// variable.
 enum AccessKind {
-  AK_Read, ///< Reading a variable.
-  AK_Written ///< Writing a variable.
+  /// Reading a variable.
+  AK_Read,
+
+  /// Writing a variable.
+  AK_Written
 };
 
 /// This enum distinguishes between different situations where we warn due to
@@ -72,8 +93,9 @@ enum LockErrorKind {
 /// Handler class for thread safety warnings.
 class ThreadSafetyHandler {
 public:
-  typedef StringRef Name;
-  ThreadSafetyHandler() : IssueBetaWarnings(false) { }
+  using Name = StringRef;
+
+  ThreadSafetyHa

[clang-tools-extra] r344299 - [Documentation] Rephrase modernize-deprecated-ios-base-aliases description. Add clangd and clang-doc placeholders in Release Notes.

2018-10-11 Thread Eugene Zelenko via cfe-commits
Author: eugenezelenko
Date: Thu Oct 11 14:40:32 2018
New Revision: 344299

URL: http://llvm.org/viewvc/llvm-project?rev=344299&view=rev
Log:
[Documentation] Rephrase modernize-deprecated-ios-base-aliases description. Add 
clangd and clang-doc placeholders in Release Notes.

Modified:
clang-tools-extra/trunk/docs/ReleaseNotes.rst

clang-tools-extra/trunk/docs/clang-tidy/checks/modernize-deprecated-ios-base-aliases.rst

Modified: clang-tools-extra/trunk/docs/ReleaseNotes.rst
URL: 
http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/docs/ReleaseNotes.rst?rev=344299&r1=344298&r2=344299&view=diff
==
--- clang-tools-extra/trunk/docs/ReleaseNotes.rst (original)
+++ clang-tools-extra/trunk/docs/ReleaseNotes.rst Thu Oct 11 14:40:32 2018
@@ -44,6 +44,16 @@ Major New Features
 
 ...
 
+Improvements to clangd
+--
+
+The improvements are...
+
+Improvements to clang-doc
+-
+
+The improvements are...
+
 Improvements to clang-query
 ---
 
@@ -99,12 +109,12 @@ Improvements to clang-tidy
   Checks for uses of nested namespaces in the form of
   ``namespace a { namespace b { ... }}`` and offers change to
   syntax introduced in C++17 standard: ``namespace a::b { ... }``.
-  
+
 - New :doc:`modernize-deprecated-ios-base-aliases
   ` check.
 
-  This check warns the uses of the deprecated member types of ``std::ios_base``
-  and replaces those that have a non-deprecated equivalent.
+  Detects usage of the deprecated member types of ``std::ios_base`` and 
replaces
+  those that have a non-deprecated equivalent.
 
 - New :doc:`readability-magic-numbers
   ` check.

Modified: 
clang-tools-extra/trunk/docs/clang-tidy/checks/modernize-deprecated-ios-base-aliases.rst
URL: 
http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/docs/clang-tidy/checks/modernize-deprecated-ios-base-aliases.rst?rev=344299&r1=344298&r2=344299&view=diff
==
--- 
clang-tools-extra/trunk/docs/clang-tidy/checks/modernize-deprecated-ios-base-aliases.rst
 (original)
+++ 
clang-tools-extra/trunk/docs/clang-tidy/checks/modernize-deprecated-ios-base-aliases.rst
 Thu Oct 11 14:40:32 2018
@@ -3,8 +3,8 @@
 modernize-deprecated-ios-base-aliases
 =
 
-This check warns the uses of the deprecated member types of ``std::ios_base``
-and replaces those that have a non-deprecated equivalent.
+Detects usage of the deprecated member types of ``std::ios_base`` and replaces
+those that have a non-deprecated equivalent.
 
 ===  ===
 Deprecated member type   Replacement


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


[clang-tools-extra] r344943 - [Documentation] Fix grammar related to Clang-tidy cppcoreguidelines-macro-usage.

2018-10-22 Thread Eugene Zelenko via cfe-commits
Author: eugenezelenko
Date: Mon Oct 22 12:55:52 2018
New Revision: 344943

URL: http://llvm.org/viewvc/llvm-project?rev=344943&view=rev
Log:
[Documentation] Fix grammar related to Clang-tidy cppcoreguidelines-macro-usage.

Modified:
clang-tools-extra/trunk/docs/ReleaseNotes.rst

clang-tools-extra/trunk/docs/clang-tidy/checks/cppcoreguidelines-macro-usage.rst

Modified: clang-tools-extra/trunk/docs/ReleaseNotes.rst
URL: 
http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/docs/ReleaseNotes.rst?rev=344943&r1=344942&r2=344943&view=diff
==
--- clang-tools-extra/trunk/docs/ReleaseNotes.rst (original)
+++ clang-tools-extra/trunk/docs/ReleaseNotes.rst Mon Oct 22 12:55:52 2018
@@ -106,7 +106,7 @@ Improvements to clang-tidy
 - New :doc:`cppcoreguidelines-macro-usage
   ` check.
 
-  Find macro usage that is considered problematic because better language
+  Finds macro usage that is considered problematic because better language
   constructs exist for the task.
 
 - New :doc:`misc-non-private-member-variables-in-classes

Modified: 
clang-tools-extra/trunk/docs/clang-tidy/checks/cppcoreguidelines-macro-usage.rst
URL: 
http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/docs/clang-tidy/checks/cppcoreguidelines-macro-usage.rst?rev=344943&r1=344942&r2=344943&view=diff
==
--- 
clang-tools-extra/trunk/docs/clang-tidy/checks/cppcoreguidelines-macro-usage.rst
 (original)
+++ 
clang-tools-extra/trunk/docs/clang-tidy/checks/cppcoreguidelines-macro-usage.rst
 Mon Oct 22 12:55:52 2018
@@ -3,7 +3,7 @@
 cppcoreguidelines-macro-usage
 =
 
-Find macro usage that is considered problematic because better language
+Finds macro usage that is considered problematic because better language
 constructs exist for the task.
 
 The relevant sections in the C++ Core Guidelines are 


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


[clang-tools-extra] r351463 - [Documentation] Add a chapter about Clang-tidy integrations.

2019-01-17 Thread Eugene Zelenko via cfe-commits
Author: eugenezelenko
Date: Thu Jan 17 10:31:34 2019
New Revision: 351463

URL: http://llvm.org/viewvc/llvm-project?rev=351463&view=rev
Log:
[Documentation] Add a chapter about Clang-tidy integrations.

Patch by Marina Kalashina.

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

Added:
clang-tools-extra/trunk/docs/clang-tidy/Contributing.rst
clang-tools-extra/trunk/docs/clang-tidy/Integrations.rst
Modified:
clang-tools-extra/trunk/docs/clang-tidy/index.rst

Added: clang-tools-extra/trunk/docs/clang-tidy/Contributing.rst
URL: 
http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/docs/clang-tidy/Contributing.rst?rev=351463&view=auto
==
--- clang-tools-extra/trunk/docs/clang-tidy/Contributing.rst (added)
+++ clang-tools-extra/trunk/docs/clang-tidy/Contributing.rst Thu Jan 17 
10:31:34 2019
@@ -0,0 +1,507 @@
+
+Getting Involved
+
+
+:program:`clang-tidy` has several own checks and can run Clang static analyzer
+checks, but its power is in the ability to easily write custom checks.
+
+Checks are organized in modules, which can be linked into :program:`clang-tidy`
+with minimal or no code changes in :program:`clang-tidy`.
+
+Checks can plug into the analysis on the preprocessor level using 
`PPCallbacks`_
+or on the AST level using `AST Matchers`_. When an error is found, checks can
+report them in a way similar to how Clang diagnostics work. A fix-it hint can 
be
+attached to a diagnostic message.
+
+The interface provided by :program:`clang-tidy` makes it easy to write useful
+and precise checks in just a few lines of code. If you have an idea for a good
+check, the rest of this document explains how to do this.
+
+There are a few tools particularly useful when developing clang-tidy checks:
+  * ``add_new_check.py`` is a script to automate the process of adding a new
+check, it will create the check, update the CMake file and create a test;
+  * ``rename_check.py`` does what the script name suggests, renames an existing
+check;
+  * :program:`clang-query` is invaluable for interactive prototyping of AST
+matchers and exploration of the Clang AST;
+  * `clang-check`_ with the ``-ast-dump`` (and optionally ``-ast-dump-filter``)
+provides a convenient way to dump AST of a C++ program.
+
+If CMake is configured with ``CLANG_ENABLE_STATIC_ANALYZER``,
+:program:`clang-tidy` will not be built with support for the
+``clang-analyzer-*`` checks or the ``mpi-*`` checks.
+
+
+.. _AST Matchers: http://clang.llvm.org/docs/LibASTMatchers.html
+.. _PPCallbacks: http://clang.llvm.org/doxygen/classclang_1_1PPCallbacks.html
+.. _clang-check: http://clang.llvm.org/docs/ClangCheck.html
+
+
+Choosing the Right Place for your Check
+---
+
+If you have an idea of a check, you should decide whether it should be
+implemented as a:
+
++ *Clang diagnostic*: if the check is generic enough, targets code patterns 
that
+  most probably are bugs (rather than style or readability issues), can be
+  implemented effectively and with extremely low false positive rate, it may
+  make a good Clang diagnostic.
+
++ *Clang static analyzer check*: if the check requires some sort of control 
flow
+  analysis, it should probably be implemented as a static analyzer check.
+
++ *clang-tidy check* is a good choice for linter-style checks, checks that are
+  related to a certain coding style, checks that address code readability, etc.
+
+
+Preparing your Workspace
+
+
+If you are new to LLVM development, you should read the `Getting Started with
+the LLVM System`_, `Using Clang Tools`_ and `How To Setup Tooling For LLVM`_
+documents to check out and build LLVM, Clang and Clang Extra Tools with CMake.
+
+Once you are done, change to the ``llvm/tools/clang/tools/extra`` directory, 
and
+let's start!
+
+.. _Getting Started with the LLVM System: 
http://llvm.org/docs/GettingStarted.html
+.. _Using Clang Tools: http://clang.llvm.org/docs/ClangTools.html
+
+
+The Directory Structure
+---
+
+:program:`clang-tidy` source code resides in the
+``llvm/tools/clang/tools/extra`` directory and is structured as follows:
+
+::
+
+  clang-tidy/   # Clang-tidy core.
+  |-- ClangTidy.h   # Interfaces for users and checks.
+  |-- ClangTidyModule.h # Interface for clang-tidy modules.
+  |-- ClangTidyModuleRegistry.h # Interface for registering of modules.
+ ...
+  |-- google/   # Google clang-tidy module.
+  |-+
+|-- GoogleTidyModule.cpp
+|-- GoogleTidyModule.h
+  ...
+  |-- llvm/ # LLVM clang-tidy module.
+  |-+
+|-- LLVMTidyModule.cpp
+|-- LLVMTidyModule.h
+  ...
+  |-- objc/ # Objective-C clang-tidy module.
+  |-+
+|-- ObjCTidyModule.cpp
+|-- ObjCTidyModule.h
+  ...
+  |-- tool/ 

[clang-tools-extra] r351466 - [Documentation] Fix link in docs/clang-tidy/Contributing.rst.

2019-01-17 Thread Eugene Zelenko via cfe-commits
Author: eugenezelenko
Date: Thu Jan 17 11:35:39 2019
New Revision: 351466

URL: http://llvm.org/viewvc/llvm-project?rev=351466&view=rev
Log:
[Documentation] Fix link in docs/clang-tidy/Contributing.rst.

Modified:
clang-tools-extra/trunk/docs/clang-tidy/Contributing.rst

Modified: clang-tools-extra/trunk/docs/clang-tidy/Contributing.rst
URL: 
http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/docs/clang-tidy/Contributing.rst?rev=351466&r1=351465&r2=351466&view=diff
==
--- clang-tools-extra/trunk/docs/clang-tidy/Contributing.rst (original)
+++ clang-tools-extra/trunk/docs/clang-tidy/Contributing.rst Thu Jan 17 
11:35:39 2019
@@ -59,8 +59,9 @@ Preparing your Workspace
 
 
 If you are new to LLVM development, you should read the `Getting Started with
-the LLVM System`_, `Using Clang Tools`_ and `How To Setup Tooling For LLVM`_
-documents to check out and build LLVM, Clang and Clang Extra Tools with CMake.
+the LLVM System`_, `Using Clang Tools`_ and `How To Setup Clang Tooling For
+LLVM`_ documents to check out and build LLVM, Clang and Clang Extra Tools with
+CMake.
 
 Once you are done, change to the ``llvm/tools/clang/tools/extra`` directory, 
and
 let's start!


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


[clang-tools-extra] r351467 - [Documentation] Another attempt to fix link in docs/clang-tidy/Contributing.rst. Use HTTPS for links.

2019-01-17 Thread Eugene Zelenko via cfe-commits
Author: eugenezelenko
Date: Thu Jan 17 11:47:44 2019
New Revision: 351467

URL: http://llvm.org/viewvc/llvm-project?rev=351467&view=rev
Log:
[Documentation] Another attempt to fix link in 
docs/clang-tidy/Contributing.rst. Use HTTPS for links.

Modified:
clang-tools-extra/trunk/docs/clang-tidy/Contributing.rst

Modified: clang-tools-extra/trunk/docs/clang-tidy/Contributing.rst
URL: 
http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/docs/clang-tidy/Contributing.rst?rev=351467&r1=351466&r2=351467&view=diff
==
--- clang-tools-extra/trunk/docs/clang-tidy/Contributing.rst (original)
+++ clang-tools-extra/trunk/docs/clang-tidy/Contributing.rst Thu Jan 17 
11:47:44 2019
@@ -32,9 +32,9 @@ If CMake is configured with ``CLANG_ENAB
 ``clang-analyzer-*`` checks or the ``mpi-*`` checks.
 
 
-.. _AST Matchers: http://clang.llvm.org/docs/LibASTMatchers.html
-.. _PPCallbacks: http://clang.llvm.org/doxygen/classclang_1_1PPCallbacks.html
-.. _clang-check: http://clang.llvm.org/docs/ClangCheck.html
+.. _AST Matchers: https://clang.llvm.org/docs/LibASTMatchers.html
+.. _PPCallbacks: https://clang.llvm.org/doxygen/classclang_1_1PPCallbacks.html
+.. _clang-check: https://clang.llvm.org/docs/ClangCheck.html
 
 
 Choosing the Right Place for your Check
@@ -66,8 +66,9 @@ CMake.
 Once you are done, change to the ``llvm/tools/clang/tools/extra`` directory, 
and
 let's start!
 
-.. _Getting Started with the LLVM System: 
http://llvm.org/docs/GettingStarted.html
-.. _Using Clang Tools: http://clang.llvm.org/docs/ClangTools.html
+.. _Getting Started with the LLVM System: 
https://llvm.org/docs/GettingStarted.html
+.. _Using Clang Tools: https://clang.llvm.org/docs/ClangTools.html
+.. _How To Setup Clang Tooling For LLVM: 
https://clang.llvm.org/docs/HowToSetupToolingForLLVM.html
 
 
 The Directory Structure
@@ -120,13 +121,13 @@ Started with LLVM`_ document for instruc
 the `LLVM Coding Standards`_ document to familiarize yourself with the coding
 style used in the project. For code reviews we mostly use `LLVM Phabricator`_.
 
-.. _Getting Started with LLVM: http://llvm.org/docs/GettingStarted.html
-.. _LLVM Coding Standards: http://llvm.org/docs/CodingStandards.html
-.. _LLVM Phabricator: http://llvm.org/docs/Phabricator.html
+.. _Getting Started with LLVM: https://llvm.org/docs/GettingStarted.html
+.. _LLVM Coding Standards: https://llvm.org/docs/CodingStandards.html
+.. _LLVM Phabricator: https://llvm.org/docs/Phabricator.html
 
 Next, you need to decide which module the check belongs to. Modules
 are located in subdirectories of `clang-tidy/
-`_
+`_
 and contain checks targeting a certain aspect of code quality (performance,
 readability, etc.), certain coding style or standard (Google, LLVM, CERT, etc.)
 or a widely used API (e.g. MPI). Their names are same as user-facing check
@@ -209,9 +210,9 @@ can further inspect them and report diag
 
 (If you want to see an example of a useful check, look at
 `clang-tidy/google/ExplicitConstructorCheck.h
-`_
+`_
 and `clang-tidy/google/ExplicitConstructorCheck.cpp
-`_).
+`_).
 
 
 Registering your Check
@@ -409,9 +410,9 @@ most frequent pitfalls are macros and te
macro expansions/template instantiations, but easily break some other
expansions/instantiations.
 
-.. _lit: http://llvm.org/docs/CommandGuide/lit.html
-.. _FileCheck: http://llvm.org/docs/CommandGuide/FileCheck.html
-.. _test/clang-tidy/google-readability-casting.cpp: 
http://reviews.llvm.org/diffusion/L/browse/clang-tools-extra/trunk/test/clang-tidy/google-readability-casting.cpp
+.. _lit: https://llvm.org/docs/CommandGuide/lit.html
+.. _FileCheck: https://llvm.org/docs/CommandGuide/FileCheck.html
+.. _test/clang-tidy/google-readability-casting.cpp: 
https://reviews.llvm.org/diffusion/L/browse/clang-tools-extra/trunk/test/clang-tidy/google-readability-casting.cpp
 
 
 Running clang-tidy on LLVM


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


[clang-tools-extra] r351468 - [Documentation] Fix another link in docs/clang-tidy/Contributing.rst.

2019-01-17 Thread Eugene Zelenko via cfe-commits
Author: eugenezelenko
Date: Thu Jan 17 12:00:23 2019
New Revision: 351468

URL: http://llvm.org/viewvc/llvm-project?rev=351468&view=rev
Log:
[Documentation] Fix another link in docs/clang-tidy/Contributing.rst.

Modified:
clang-tools-extra/trunk/docs/clang-tidy/Contributing.rst

Modified: clang-tools-extra/trunk/docs/clang-tidy/Contributing.rst
URL: 
http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/docs/clang-tidy/Contributing.rst?rev=351468&r1=351467&r2=351468&view=diff
==
--- clang-tools-extra/trunk/docs/clang-tidy/Contributing.rst (original)
+++ clang-tools-extra/trunk/docs/clang-tidy/Contributing.rst Thu Jan 17 
12:00:23 2019
@@ -422,12 +422,15 @@ To test a check it's best to try it out
 are the natural targets as you already have the source code around. The most
 convenient way to run :program:`clang-tidy` is with a compile command database;
 CMake can automatically generate one, for a description of how to enable it see
-`How To Setup Tooling For LLVM`_. Once ``compile_commands.json`` is in place 
and
-a working version of :program:`clang-tidy` is in ``PATH`` the entire code base
-can be analyzed with ``clang-tidy/tool/run-clang-tidy.py``. The script executes
-:program:`clang-tidy` with the default set of checks on every translation unit
-in the compile command database and displays the resulting warnings and errors.
-The script provides multiple configuration flags.
+`How To Setup Clang Tooling For LLVM`_. Once ``compile_commands.json`` is in
+place and a working version of :program:`clang-tidy` is in ``PATH`` the entire
+code base can be analyzed with ``clang-tidy/tool/run-clang-tidy.py``. The 
script
+executes :program:`clang-tidy` with the default set of checks on every
+translation unit in the compile command database and displays the resulting
+warnings and errors. The script provides multiple configuration flags.
+
+.. _How To Setup Clang Tooling For LLVM: 
https://clang.llvm.org/docs/HowToSetupToolingForLLVM.html
+
 
 * The default set of checks can be overridden using the ``-checks`` argument,
   taking the identical format as :program:`clang-tidy` does. For example


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


[clang-tools-extra] r351862 - [Documentation] Use HTTPS whenever possible.

2019-01-22 Thread Eugene Zelenko via cfe-commits
Author: eugenezelenko
Date: Tue Jan 22 11:19:48 2019
New Revision: 351862

URL: http://llvm.org/viewvc/llvm-project?rev=351862&view=rev
Log:
[Documentation] Use HTTPS whenever possible.

Differential revision: https://reviews.llvm.org/D56926

Modified:
clang-tools-extra/trunk/docs/clang-doc.rst
clang-tools-extra/trunk/docs/clang-rename.rst
clang-tools-extra/trunk/docs/clang-tidy.rst
clang-tools-extra/trunk/docs/clang-tidy/Integrations.rst

clang-tools-extra/trunk/docs/clang-tidy/checks/google-objc-avoid-throwing-exception.rst

clang-tools-extra/trunk/docs/clang-tidy/checks/google-objc-global-variable-declaration.rst
clang-tools-extra/trunk/docs/clang-tidy/checks/llvm-include-order.rst
clang-tools-extra/trunk/docs/clang-tidy/checks/llvm-namespace-comment.rst
clang-tools-extra/trunk/docs/clang-tidy/checks/modernize-pass-by-value.rst
clang-tools-extra/trunk/docs/clang-tidy/checks/modernize-use-emplace.rst

clang-tools-extra/trunk/docs/clang-tidy/checks/portability-simd-intrinsics.rst

clang-tools-extra/trunk/docs/clang-tidy/checks/readability-else-after-return.rst
clang-tools-extra/trunk/docs/clang-tidy/checks/readability-magic-numbers.rst
clang-tools-extra/trunk/docs/clang-tidy/index.rst
clang-tools-extra/trunk/docs/clangd.rst
clang-tools-extra/trunk/docs/include-fixer.rst
clang-tools-extra/trunk/docs/modularize.rst
clang-tools-extra/trunk/docs/pp-trace.rst

Modified: clang-tools-extra/trunk/docs/clang-doc.rst
URL: 
http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/docs/clang-doc.rst?rev=351862&r1=351861&r2=351862&view=diff
==
--- clang-tools-extra/trunk/docs/clang-doc.rst (original)
+++ clang-tools-extra/trunk/docs/clang-doc.rst Tue Jan 22 11:19:48 2019
@@ -20,10 +20,10 @@ Use
 =
 
 :program:`clang-doc` is a `LibTooling
-`_-based tool, and so requires a
+`_-based tool, and so requires a
 compile command database for your project (for an example of how to do this 
 see `How To Setup Tooling For LLVM
-`_).
+`_).
 
 The tool can be used on a single file or multiple files as defined in 
 the compile commands database:

Modified: clang-tools-extra/trunk/docs/clang-rename.rst
URL: 
http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/docs/clang-rename.rst?rev=351862&r1=351861&r2=351862&view=diff
==
--- clang-tools-extra/trunk/docs/clang-rename.rst (original)
+++ clang-tools-extra/trunk/docs/clang-rename.rst Tue Jan 22 11:19:48 2019
@@ -24,10 +24,10 @@ Using Clang-Rename
 ==
 
 :program:`clang-rename` is a `LibTooling
-`_-based tool, and it's easier to
+`_-based tool, and it's easier to
 work with if you set up a compile command database for your project (for an
 example of how to do this see `How To Setup Tooling For LLVM
-`_). You can also
+`_). You can also
 specify compilation options on the command line after `--`:
 
 .. code-block:: console
@@ -140,7 +140,7 @@ Vim Integration
 You can call :program:`clang-rename` directly from Vim! To set up
 :program:`clang-rename` integration for Vim see
 `clang-rename/tool/clang-rename.py
-`_.
+`_.
 
 Please note that **you have to save all buffers, in which the replacement will
 happen before running the tool**.
@@ -157,7 +157,7 @@ Emacs Integration
 You can also use :program:`clang-rename` while using Emacs! To set up
 :program:`clang-rename` integration for Emacs see
 `clang-rename/tool/clang-rename.el
-`_.
+`_.
 
 Once installed, you can point your cursor to symbols you want to rename, press
 `M-X`, type `clang-rename` and new desired name.

Modified: clang-tools-extra/trunk/docs/clang-tidy.rst
URL: 
http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/docs/clang-tidy.rst?rev=351862&r1=351861&r2=351862&view=diff
==
--- clang-tools-extra/trunk/docs/clang-tidy.rst (original)
+++ clang-tools-extra/trunk/docs/clang-tidy.rst Tue Jan 22 11:19:48 2019
@@ -3,4 +3,4 @@
 .. meta::
:http-equiv=refresh: 0;URL='clang-tidy/'
 
-clang-

r351976 - [Documentation] Use HTTPS whenever possible

2019-01-23 Thread Eugene Zelenko via cfe-commits
Author: eugenezelenko
Date: Wed Jan 23 12:39:07 2019
New Revision: 351976

URL: http://llvm.org/viewvc/llvm-project?rev=351976&view=rev
Log:
[Documentation] Use HTTPS whenever possible

Differential revision: https://reviews.llvm.org/D56946

Modified:
cfe/trunk/docs/AutomaticReferenceCounting.rst
cfe/trunk/docs/ClangFormatStyleOptions.rst
cfe/trunk/docs/ControlFlowIntegrity.rst
cfe/trunk/docs/ControlFlowIntegrityDesign.rst
cfe/trunk/docs/ExternalClangExamples.rst
cfe/trunk/docs/HardwareAssistedAddressSanitizerDesign.rst
cfe/trunk/docs/HowToSetupToolingForLLVM.rst
cfe/trunk/docs/InternalsManual.rst
cfe/trunk/docs/IntroductionToTheClangAST.rst
cfe/trunk/docs/JSONCompilationDatabase.rst
cfe/trunk/docs/LanguageExtensions.rst
cfe/trunk/docs/MSVCCompatibility.rst
cfe/trunk/docs/PCHInternals.rst
cfe/trunk/docs/SafeStack.rst
cfe/trunk/docs/SanitizerCoverage.rst
cfe/trunk/docs/Toolchain.rst
cfe/trunk/docs/UndefinedBehaviorSanitizer.rst
cfe/trunk/docs/UsersManual.rst
cfe/trunk/docs/analyzer/DesignDiscussions/InitializerLists.rst

Modified: cfe/trunk/docs/AutomaticReferenceCounting.rst
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/docs/AutomaticReferenceCounting.rst?rev=351976&r1=351975&r2=351976&view=diff
==
--- cfe/trunk/docs/AutomaticReferenceCounting.rst (original)
+++ cfe/trunk/docs/AutomaticReferenceCounting.rst Wed Jan 23 12:39:07 2019
@@ -9,7 +9,7 @@
 
 /*
  * Automatic numbering is described in this article:
- * 
http://dev.opera.com/articles/view/automatic-numbering-with-css-counters/
+ * 
https://dev.opera.com/articles/view/automatic-numbering-with-css-counters/
  */
 /*
  * Automatic numbering for the TOC.

Modified: cfe/trunk/docs/ClangFormatStyleOptions.rst
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/docs/ClangFormatStyleOptions.rst?rev=351976&r1=351975&r2=351976&view=diff
==
--- cfe/trunk/docs/ClangFormatStyleOptions.rst (original)
+++ cfe/trunk/docs/ClangFormatStyleOptions.rst Wed Jan 23 12:39:07 2019
@@ -137,13 +137,13 @@ the configuration (without a prefix: ``A
 `_
   * ``Chromium``
 A style complying with `Chromium's style guide
-`_
+`_
   * ``Mozilla``
 A style complying with `Mozilla's style guide
 `_
   * ``WebKit``
 A style complying with `WebKit's style guide
-`_
+`_
 
 .. START_FORMAT_STYLE_OPTIONS
 
@@ -1278,7 +1278,7 @@ the configuration (without a prefix: ``A
   used for ordering ``#includes``.
 
   `POSIX extended
-  `_
+  `_
   regular expressions are supported.
 
   These regular expressions are matched against the filename of an include

Modified: cfe/trunk/docs/ControlFlowIntegrity.rst
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/docs/ControlFlowIntegrity.rst?rev=351976&r1=351975&r2=351976&view=diff
==
--- cfe/trunk/docs/ControlFlowIntegrity.rst (original)
+++ cfe/trunk/docs/ControlFlowIntegrity.rst Wed Jan 23 12:39:07 2019
@@ -335,7 +335,7 @@ Please refer to the :doc:`design documen
 Publications
 
 
-`Control-Flow Integrity: Principles, Implementations, and Applications 
`_.
+`Control-Flow Integrity: Principles, Implementations, and Applications 
`_.
 Martin Abadi, Mihai Budiu, Úlfar Erlingsson, Jay Ligatti.
 
 `Enforcing Forward-Edge Control-Flow Integrity in GCC & LLVM 
`_.

Modified: cfe/trunk/docs/ControlFlowIntegrityDesign.rst
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/docs/ControlFlowIntegrityDesign.rst?rev=351976&r1=351975&r2=351976&view=diff
==
--- cfe/trunk/docs/ControlFlowIntegrityDesign.rst (original)
+++ cfe/trunk/docs/ControlFlowIntegrityDesign.rst Wed Jan 23 12:39:07 2019
@@ -92,7 +92,7 @@ The compiler relies on co-operation from
 the bit vectors for the whole program. It currently does this using LLVM's
 `type metadata`_ mechanism together with link-time optimization.
 
-.. _address point: 
http://itanium-cxx-abi.github.io/cxx-abi/abi.html#vtable-general
+.. _address point: 
https://itanium-cxx-abi.github.io/cxx-abi/abi.html#vtable-general
 .. _type metadata: https://llvm.

r351977 - [Documentation] Fix problem in docs/SafeStack.rst introduced in r351976.

2019-01-23 Thread Eugene Zelenko via cfe-commits
Author: eugenezelenko
Date: Wed Jan 23 12:51:06 2019
New Revision: 351977

URL: http://llvm.org/viewvc/llvm-project?rev=351977&view=rev
Log:
[Documentation] Fix problem in docs/SafeStack.rst introduced in r351976.

Modified:
cfe/trunk/docs/SafeStack.rst

Modified: cfe/trunk/docs/SafeStack.rst
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/docs/SafeStack.rst?rev=351977&r1=351976&r2=351977&view=diff
==
--- cfe/trunk/docs/SafeStack.rst (original)
+++ cfe/trunk/docs/SafeStack.rst Wed Jan 23 12:51:06 2019
@@ -25,7 +25,7 @@ Performance
 
 The performance overhead of the SafeStack instrumentation is less than 0.1% on
 average across a variety of benchmarks (see the `Code-Pointer Integrity
-`_ paper for details). This is mainly
+`__ paper for details). This is mainly
 because most small functions do not have any variables that require the unsafe
 stack and, hence, do not need unsafe stack frames to be created. The cost of
 creating unsafe stack frames for large functions is amortized by the cost of
@@ -186,7 +186,7 @@ Deprecated: This builtin function is an
 Design
 ==
 
-Please refer to the `Code-Pointer Integrity `_
+Please refer to the `Code-Pointer Integrity 
`__
 project page for more information about the design of the SafeStack and its
 related technologies.
 
@@ -204,7 +204,7 @@ in the function ``SafeStack::createStack
 Publications
 
 
-`Code-Pointer Integrity `_.
+`Code-Pointer Integrity `__.
 Volodymyr Kuznetsov, Laszlo Szekeres, Mathias Payer, George Candea, R. Sekar, 
Dawn Song.
 USENIX Symposium on Operating Systems Design and Implementation
 (`OSDI `_), Broomfield, CO, October 
2014


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


[clang-tools-extra] r347825 - [Documentation] Try to fix build failure in cppcoreguidelines-narrowing-conversions documentation

2018-11-28 Thread Eugene Zelenko via cfe-commits
Author: eugenezelenko
Date: Wed Nov 28 18:13:25 2018
New Revision: 347825

URL: http://llvm.org/viewvc/llvm-project?rev=347825&view=rev
Log:
[Documentation] Try to fix build failure in 
cppcoreguidelines-narrowing-conversions documentation

Modified:

clang-tools-extra/trunk/docs/clang-tidy/checks/cppcoreguidelines-narrowing-conversions.rst

Modified: 
clang-tools-extra/trunk/docs/clang-tidy/checks/cppcoreguidelines-narrowing-conversions.rst
URL: 
http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/docs/clang-tidy/checks/cppcoreguidelines-narrowing-conversions.rst?rev=347825&r1=347824&r2=347825&view=diff
==
--- 
clang-tools-extra/trunk/docs/clang-tidy/checks/cppcoreguidelines-narrowing-conversions.rst
 (original)
+++ 
clang-tools-extra/trunk/docs/clang-tidy/checks/cppcoreguidelines-narrowing-conversions.rst
 Wed Nov 28 18:13:25 2018
@@ -27,15 +27,15 @@ This check will flag:
For example: ``int i; i+= 0.1;``.
 
 
- Options
- ---
+Options
+---
 
- .. option:: WarnOnFloatingPointNarrowingConversion
+.. option:: WarnOnFloatingPointNarrowingConversion
 
 When non-zero, the check will warn on narrowing floating point conversion
 (e.g. ``double`` to ``float``). `1` by default.
 
-  .. option:: PedanticMode
+.. option:: PedanticMode
 
 When non-zero, the check will warn on assigning a floating point constant
 to an integer value even if the floating point value is exactly


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


[clang-tools-extra] r348202 - [Documentation] Fix formatting and wrap up to 80 characters in Clang-tidy readability-uppercase-literal-suffix documentation.

2018-12-03 Thread Eugene Zelenko via cfe-commits
Author: eugenezelenko
Date: Mon Dec  3 14:35:40 2018
New Revision: 348202

URL: http://llvm.org/viewvc/llvm-project?rev=348202&view=rev
Log:
[Documentation] Fix formatting and wrap up to 80 characters in Clang-tidy 
readability-uppercase-literal-suffix documentation.

Modified:

clang-tools-extra/trunk/docs/clang-tidy/checks/readability-uppercase-literal-suffix.rst

Modified: 
clang-tools-extra/trunk/docs/clang-tidy/checks/readability-uppercase-literal-suffix.rst
URL: 
http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/docs/clang-tidy/checks/readability-uppercase-literal-suffix.rst?rev=348202&r1=348201&r2=348202&view=diff
==
--- 
clang-tools-extra/trunk/docs/clang-tidy/checks/readability-uppercase-literal-suffix.rst
 (original)
+++ 
clang-tools-extra/trunk/docs/clang-tidy/checks/readability-uppercase-literal-suffix.rst
 Mon Dec  3 14:35:40 2018
@@ -4,14 +4,14 @@ readability-uppercase-literal-suffix
 
 
 `cert-dcl16-c` redirects here as an alias for this check.
-By default, only the suffixes that begin with 'l' ("l", "ll", "lu", "llu",
-but not "u", "ul", "ull") are diagnosed by that alias.
+By default, only the suffixes that begin with ``l`` (``l``, ``ll``, ``lu``,
+``llu``, but not ``u``, ``ul``, ``ull``) are diagnosed by that alias.
 
 `hicpp-uppercase-literal-suffix` redirects here as an alias for this check.
 
 Detects when the integral literal or floating point (decimal or hexadecimal)
-literal has a non-uppercase suffix and provides a fix-it-hint
-with the uppercase suffix.
+literal has a non-uppercase suffix and provides a fix-it hint with the 
uppercase
+suffix.
 
 All valid combinations of suffixes are supported.
 
@@ -25,13 +25,14 @@ All valid combinations of suffixes are s
 
   ...
 
-Optionally, a list of the destination suffixes can be provided.
-When the suffix is found, a case-insensitive lookup in that list is made,
-and if a replacement is found that is different from the current suffix,
-then the diagnostic is issued. This allows for fine-grained control of
-what suffixes to consider and what their replacements should be.
+Optionally, a list of the destination suffixes can be provided. When the suffix
+is found, a case-insensitive lookup in that list is made, and if a replacement
+is found that is different from the current suffix, then the diagnostic is
+issued. This allows for fine-grained control of what suffixes to consider and
+what their replacements should be.
 
 For example, given a list ``L;uL``:
+
 * ``l`` -> ``L``
 * ``L`` will be kept as is.
 * ``ul`` -> ``uL``


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


[clang-tools-extra] r348302 - [Documentation] Make options section in Clang-tidy readability-uppercase-literal-suffix consistent with other checks.

2018-12-04 Thread Eugene Zelenko via cfe-commits
Author: eugenezelenko
Date: Tue Dec  4 13:19:08 2018
New Revision: 348302

URL: http://llvm.org/viewvc/llvm-project?rev=348302&view=rev
Log:
[Documentation] Make options section in Clang-tidy 
readability-uppercase-literal-suffix consistent with other checks.

Modified:

clang-tools-extra/trunk/docs/clang-tidy/checks/readability-uppercase-literal-suffix.rst

Modified: 
clang-tools-extra/trunk/docs/clang-tidy/checks/readability-uppercase-literal-suffix.rst
URL: 
http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/docs/clang-tidy/checks/readability-uppercase-literal-suffix.rst?rev=348302&r1=348301&r2=348302&view=diff
==
--- 
clang-tools-extra/trunk/docs/clang-tidy/checks/readability-uppercase-literal-suffix.rst
 (original)
+++ 
clang-tools-extra/trunk/docs/clang-tidy/checks/readability-uppercase-literal-suffix.rst
 Tue Dec  4 13:19:08 2018
@@ -25,13 +25,21 @@ All valid combinations of suffixes are s
 
   ...
 
-Optionally, a list of the destination suffixes can be provided. When the suffix
-is found, a case-insensitive lookup in that list is made, and if a replacement
-is found that is different from the current suffix, then the diagnostic is
-issued. This allows for fine-grained control of what suffixes to consider and
-what their replacements should be.
+Options
+---
 
-For example, given a list ``L;uL``:
+.. option:: NewSuffixes
+
+  Optionally, a list of the destination suffixes can be provided. When the
+  suffix is found, a case-insensitive lookup in that list is made, and if a
+  replacement is found that is different from the current suffix, then the
+  diagnostic is issued. This allows for fine-grained control of what suffixes 
to
+  consider and what their replacements should be.
+
+Example
+^^^
+
+Given a list `L;uL`:
 
 * ``l`` -> ``L``
 * ``L`` will be kept as is.


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


[clang-tools-extra] r348666 - [Documentation] Alphabetical order in new checks list.

2018-12-07 Thread Eugene Zelenko via cfe-commits
Author: eugenezelenko
Date: Fri Dec  7 16:07:34 2018
New Revision: 348666

URL: http://llvm.org/viewvc/llvm-project?rev=348666&view=rev
Log:
[Documentation] Alphabetical order in new checks list.

Modified:
clang-tools-extra/trunk/docs/ReleaseNotes.rst

Modified: clang-tools-extra/trunk/docs/ReleaseNotes.rst
URL: 
http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/docs/ReleaseNotes.rst?rev=348666&r1=348665&r2=348666&view=diff
==
--- clang-tools-extra/trunk/docs/ReleaseNotes.rst (original)
+++ clang-tools-extra/trunk/docs/ReleaseNotes.rst Fri Dec  7 16:07:34 2018
@@ -122,13 +122,6 @@ Improvements to clang-tidy
   Flags uses of ``absl::StrCat()`` to append to a ``std::string``. Suggests
   ``absl::StrAppend()`` should be used instead.
 
-- New :doc:`bugprone-too-small-loop-variable
-  ` check.
-
-  Detects those ``for`` loops that have a loop variable with a "too small" type
-  which means this type can't represent all values which are part of the
-  iteration range.
-
 - New :doc:`abseil-upgrade-duration-conversions
   ` check.
 
@@ -136,6 +129,13 @@ Improvements to clang-tidy
   argument needs an explicit cast to continue compiling after upcoming API
   changes.
 
+- New :doc:`bugprone-too-small-loop-variable
+  ` check.
+
+  Detects those ``for`` loops that have a loop variable with a "too small" type
+  which means this type can't represent all values which are part of the
+  iteration range.
+
 - New :doc:`cppcoreguidelines-macro-usage
   ` check.
 


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


[clang-tools-extra] r342601 - [Clang-tidy] Alphabetical sort of files/checks. Add space after clang-tidy in source code headers.

2018-09-19 Thread Eugene Zelenko via cfe-commits
Author: eugenezelenko
Date: Wed Sep 19 17:02:55 2018
New Revision: 342601

URL: http://llvm.org/viewvc/llvm-project?rev=342601&view=rev
Log:
[Clang-tidy] Alphabetical sort of files/checks. Add space after clang-tidy in 
source code headers.

Modified:
clang-tools-extra/trunk/clang-tidy/abseil/AbseilTidyModule.cpp
clang-tools-extra/trunk/clang-tidy/abseil/CMakeLists.txt
clang-tools-extra/trunk/clang-tidy/add_new_check.py
clang-tools-extra/trunk/clang-tidy/android/AndroidTidyModule.cpp
clang-tools-extra/trunk/clang-tidy/android/CMakeLists.txt
clang-tools-extra/trunk/clang-tidy/cppcoreguidelines/CMakeLists.txt
clang-tools-extra/trunk/clang-tidy/hicpp/CMakeLists.txt
clang-tools-extra/trunk/clang-tidy/misc/CMakeLists.txt
clang-tools-extra/trunk/clang-tidy/misc/MiscTidyModule.cpp
clang-tools-extra/trunk/clang-tidy/modernize/CMakeLists.txt
clang-tools-extra/trunk/clang-tidy/readability/CMakeLists.txt

Modified: clang-tools-extra/trunk/clang-tidy/abseil/AbseilTidyModule.cpp
URL: 
http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-tidy/abseil/AbseilTidyModule.cpp?rev=342601&r1=342600&r2=342601&view=diff
==
--- clang-tools-extra/trunk/clang-tidy/abseil/AbseilTidyModule.cpp (original)
+++ clang-tools-extra/trunk/clang-tidy/abseil/AbseilTidyModule.cpp Wed Sep 19 
17:02:55 2018
@@ -34,10 +34,10 @@ public:
 CheckFactories.registerCheck("abseil-no-namespace");
 CheckFactories.registerCheck(
 "abseil-redundant-strcat-calls");
-CheckFactories.registerCheck(
-"abseil-string-find-startswith");
 CheckFactories.registerCheck(
 "abseil-str-cat-append");
+CheckFactories.registerCheck(
+"abseil-string-find-startswith");
   }
 };
 

Modified: clang-tools-extra/trunk/clang-tidy/abseil/CMakeLists.txt
URL: 
http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-tidy/abseil/CMakeLists.txt?rev=342601&r1=342600&r2=342601&view=diff
==
--- clang-tools-extra/trunk/clang-tidy/abseil/CMakeLists.txt (original)
+++ clang-tools-extra/trunk/clang-tidy/abseil/CMakeLists.txt Wed Sep 19 
17:02:55 2018
@@ -7,8 +7,8 @@ add_clang_library(clangTidyAbseilModule
   NoInternalDependenciesCheck.cpp
   NoNamespaceCheck.cpp
   RedundantStrcatCallsCheck.cpp
-  StringFindStartswithCheck.cpp
   StrCatAppendCheck.cpp
+  StringFindStartswithCheck.cpp
 
   LINK_LIBS
   clangAST

Modified: clang-tools-extra/trunk/clang-tidy/add_new_check.py
URL: 
http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-tidy/add_new_check.py?rev=342601&r1=342600&r2=342601&view=diff
==
--- clang-tools-extra/trunk/clang-tidy/add_new_check.py (original)
+++ clang-tools-extra/trunk/clang-tidy/add_new_check.py Wed Sep 19 17:02:55 2018
@@ -56,8 +56,8 @@ def write_header(module_path, module, ch
 + check_name_camel.upper() + '_H')
 f.write('//===--- ')
 f.write(os.path.basename(filename))
-f.write(' - clang-tidy')
-f.write('-' * max(0, 43 - len(os.path.basename(filename
+f.write(' - clang-tidy ')
+f.write('-' * max(0, 42 - len(os.path.basename(filename
 f.write('*- C++ -*-===//')
 f.write("""
 //
@@ -107,8 +107,8 @@ def write_implementation(module_path, mo
   with open(filename, 'w') as f:
 f.write('//===--- ')
 f.write(os.path.basename(filename))
-f.write(' - clang-tidy')
-f.write('-' * max(0, 52 - len(os.path.basename(filename
+f.write(' - clang-tidy ')
+f.write('-' * max(0, 51 - len(os.path.basename(filename
 f.write('-===//')
 f.write("""
 //

Modified: clang-tools-extra/trunk/clang-tidy/android/AndroidTidyModule.cpp
URL: 
http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-tidy/android/AndroidTidyModule.cpp?rev=342601&r1=342600&r2=342601&view=diff
==
--- clang-tools-extra/trunk/clang-tidy/android/AndroidTidyModule.cpp (original)
+++ clang-tools-extra/trunk/clang-tidy/android/AndroidTidyModule.cpp Wed Sep 19 
17:02:55 2018
@@ -37,16 +37,16 @@ public:
 
CheckFactories.registerCheck("android-cloexec-accept4");
 CheckFactories.registerCheck("android-cloexec-accept");
 CheckFactories.registerCheck("android-cloexec-creat");
+CheckFactories.registerCheck("android-cloexec-dup");
 CheckFactories.registerCheck(
 "android-cloexec-epoll-create1");
 CheckFactories.registerCheck(
 "android-cloexec-epoll-create");
-CheckFactories.registerCheck("android-cloexec-dup");
 CheckFactories.registerCheck("android-cloexec-fopen");
-CheckFactories.registerCheck(
-"android-cloexec-inotify-init");
 CheckFactories.registerCheck(
 "android-cloexec-inotify-init1");
+CheckFactories.registerCheck(
+ 

[clang-tools-extra] r350273 - [Documentation] Alphabetical order in Clang-tidy checks changes list.

2019-01-02 Thread Eugene Zelenko via cfe-commits
Author: eugenezelenko
Date: Wed Jan  2 15:35:57 2019
New Revision: 350273

URL: http://llvm.org/viewvc/llvm-project?rev=350273&view=rev
Log:
[Documentation] Alphabetical order in Clang-tidy checks changes list.

Modified:
clang-tools-extra/trunk/docs/ReleaseNotes.rst

Modified: clang-tools-extra/trunk/docs/ReleaseNotes.rst
URL: 
http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/docs/ReleaseNotes.rst?rev=350273&r1=350272&r2=350273&view=diff
==
--- clang-tools-extra/trunk/docs/ReleaseNotes.rst (original)
+++ clang-tools-extra/trunk/docs/ReleaseNotes.rst Wed Jan  2 15:35:57 2019
@@ -232,14 +232,6 @@ Improvements to clang-tidy
   `
   added.
 
-- The :doc:`readability-redundant-smartptr-get
-  ` check does not warn
-  about calls inside macros anymore by default.
-
-- The :doc:`readability-uppercase-literal-suffix
-  ` check does not warn
-  about literal suffixes inside macros anymore by default.
-
 - The :doc:`cppcoreguidelines-narrowing-conversions
   ` check now
   detects more narrowing conversions:
@@ -252,6 +244,14 @@ Improvements to clang-tidy
   ` check now ignores the
   `Acronyms` and `IncludeDefaultAcronyms` options.
 
+- The :doc:`readability-redundant-smartptr-get
+  ` check does not warn
+  about calls inside macros anymore by default.
+
+- The :doc:`readability-uppercase-literal-suffix
+  ` check does not warn
+  about literal suffixes inside macros anymore by default.
+
 Improvements to include-fixer
 -
 


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


[clang-tools-extra] r329927 - [Documentation] Order of changes in existing checks in Release Notes.

2018-04-12 Thread Eugene Zelenko via cfe-commits
Author: eugenezelenko
Date: Thu Apr 12 10:19:09 2018
New Revision: 329927

URL: http://llvm.org/viewvc/llvm-project?rev=329927&view=rev
Log:
[Documentation] Order of changes in existing checks in Release Notes.

Modified:
clang-tools-extra/trunk/docs/ReleaseNotes.rst

Modified: clang-tools-extra/trunk/docs/ReleaseNotes.rst
URL: 
http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/docs/ReleaseNotes.rst?rev=329927&r1=329926&r2=329927&view=diff
==
--- clang-tools-extra/trunk/docs/ReleaseNotes.rst (original)
+++ clang-tools-extra/trunk/docs/ReleaseNotes.rst Thu Apr 12 10:19:09 2018
@@ -146,6 +146,9 @@ Improvements to clang-tidy
 
   Warns on construction of specific temporary objects in the Zircon kernel.
 
+- Adding the missing bitwise assignment operations to 
+  :doc:`hicpp-signed-bitwise `.
+
 - New option `MinTypeNameLength` for :doc:`modernize-use-auto
   ` check to limit the minimal length of
   type names to be replaced with ``auto``. Use to skip replacing short type
@@ -153,18 +156,16 @@ Improvements to clang-tidy
   replace types with the name length >= 5 letters only (ex. ``double``,
   ``unsigned``).
 
-- New alias :doc:`hicpp-avoid-goto
-  ` to :doc:`cppcoreguidelines-avoid-goto
-  `
-  added.
-
 - Added `VariableThreshold` option to :doc:`readability-function-size
   ` check
 
-  Flags functions that have more than a specified number of variables declared 
in the body.
+  Flags functions that have more than a specified number of variables declared
+  in the body.
 
-- Adding the missing bitwise assignment operations to 
-  :doc:`hicpp-signed-bitwise `.
+- New alias :doc:`hicpp-avoid-goto
+  ` to :doc:`cppcoreguidelines-avoid-goto
+  `
+  added.
 
 - The 'misc-forwarding-reference-overload' check was renamed to 
:doc:`bugprone-forwarding-reference-overload
   `


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


r330068 - [Serialization] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC).

2018-04-13 Thread Eugene Zelenko via cfe-commits
Author: eugenezelenko
Date: Fri Apr 13 14:12:33 2018
New Revision: 330068

URL: http://llvm.org/viewvc/llvm-project?rev=330068&view=rev
Log:
[Serialization] Fix some Clang-tidy modernize and Include What You Use 
warnings; other minor fixes (NFC).

Modified:
cfe/trunk/lib/Serialization/ASTReader.cpp

Modified: cfe/trunk/lib/Serialization/ASTReader.cpp
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Serialization/ASTReader.cpp?rev=330068&r1=330067&r2=330068&view=diff
==
--- cfe/trunk/lib/Serialization/ASTReader.cpp (original)
+++ cfe/trunk/lib/Serialization/ASTReader.cpp Fri Apr 13 14:12:33 2018
@@ -71,6 +71,7 @@
 #include "clang/Lex/Preprocessor.h"
 #include "clang/Lex/PreprocessorOptions.h"
 #include "clang/Lex/Token.h"
+#include "clang/Sema/DeclSpec.h"
 #include "clang/Sema/ObjCMethodList.h"
 #include "clang/Sema/Scope.h"
 #include "clang/Sema/Sema.h"
@@ -97,11 +98,11 @@
 #include "llvm/ADT/SmallPtrSet.h"
 #include "llvm/ADT/SmallString.h"
 #include "llvm/ADT/SmallVector.h"
-#include "llvm/ADT/StringExtras.h"
 #include "llvm/ADT/StringMap.h"
 #include "llvm/ADT/StringRef.h"
 #include "llvm/ADT/Triple.h"
 #include "llvm/ADT/iterator_range.h"
+#include "llvm/Bitcode/BitCodes.h"
 #include "llvm/Bitcode/BitstreamReader.h"
 #include "llvm/Support/Casting.h"
 #include "llvm/Support/Compression.h"
@@ -133,8 +134,8 @@
 #include 
 
 using namespace clang;
-using namespace clang::serialization;
-using namespace clang::serialization::reader;
+using namespace serialization;
+using namespace reader;
 using llvm::BitstreamCursor;
 
 
//===--===//
@@ -463,7 +464,7 @@ static bool checkDiagnosticGroupMappings
   // errors because of options like -Werror.
   DiagnosticsEngine *MappingSources[] = { &Diags, &StoredDiags };
 
-  for (DiagnosticsEngine *MappingSource : MappingSources) {
+  for (auto *MappingSource : MappingSources) {
 for (auto DiagIDMappingPair : MappingSource->getDiagnosticMappings()) {
   diag::kind DiagID = DiagIDMappingPair.first;
   Level CurLevel = Diags.getDiagnosticLevel(DiagID, SourceLocation());
@@ -581,9 +582,9 @@ static void
 collectMacroDefinitions(const PreprocessorOptions &PPOpts,
 MacroDefinitionsMap &Macros,
 SmallVectorImpl *MacroNames = nullptr) {
-  for (unsigned I = 0, N = PPOpts.Macros.size(); I != N; ++I) {
-StringRef Macro = PPOpts.Macros[I].first;
-bool IsUndef = PPOpts.Macros[I].second;
+  for (const auto &I : PPOpts.Macros) {
+StringRef Macro = I.first;
+bool IsUndef = I.second;
 
 std::pair MacroPair = Macro.split('=');
 StringRef MacroName = MacroPair.first;
@@ -634,9 +635,8 @@ static bool checkPreprocessorOptions(con
   SmallVector ExistingMacroNames;
   collectMacroDefinitions(ExistingPPOpts, ExistingMacros, &ExistingMacroNames);
 
-  for (unsigned I = 0, N = ExistingMacroNames.size(); I != N; ++I) {
+  for (auto MacroName : ExistingMacroNames) {
 // Dig out the macro definition in the existing preprocessor options.
-StringRef MacroName = ExistingMacroNames[I];
 std::pair Existing = ExistingMacros[MacroName];
 
 // Check whether we know anything about this macro name or not.
@@ -702,8 +702,7 @@ static bool checkPreprocessorOptions(con
   }
 
   // Compute the #include and #include_macros lines we need.
-  for (unsigned I = 0, N = ExistingPPOpts.Includes.size(); I != N; ++I) {
-StringRef File = ExistingPPOpts.Includes[I];
+  for (const auto &File : ExistingPPOpts.Includes) {
 if (File == ExistingPPOpts.ImplicitPCHInclude)
   continue;
 
@@ -716,8 +715,7 @@ static bool checkPreprocessorOptions(con
 SuggestedPredefines += "\"\n";
   }
 
-  for (unsigned I = 0, N = ExistingPPOpts.MacroIncludes.size(); I != N; ++I) {
-StringRef File = ExistingPPOpts.MacroIncludes[I];
+  for (const auto &File : ExistingPPOpts.MacroIncludes) {
 if (std::find(PPOpts.MacroIncludes.begin(), PPOpts.MacroIncludes.end(),
   File)
 != PPOpts.MacroIncludes.end())
@@ -855,14 +853,14 @@ ASTSelectorLookupTrait::ReadData(Selecto
 
   // Load instance methods
   for (unsigned I = 0; I != NumInstanceMethods; ++I) {
-if (ObjCMethodDecl *Method = Reader.GetLocalDeclAs(
+if (auto *Method = Reader.GetLocalDeclAs(
 F, endian::readNext(d)))
   Result.Instance.push_back(Method);
   }
 
   // Load factory methods
   for (unsigned I = 0; I != NumFactoryMethods; ++I) {
-if (ObjCMethodDecl *Method = Reader.GetLocalDeclAs(
+if (auto *Method = Reader.GetLocalDeclAs(
 F, endian::readNext(d)))
   Result.Factory.push_back(Method);
   }
@@ -1087,7 +1085,7 @@ ASTDeclContextNameLookupTrait::internal_
 ASTDeclContextNameLookupTrait::ReadKey(const unsigned char *d, unsigned) {
   using namespace llvm::support;
 
-  auto Kind = (DeclarationName::NameKind)*d++;
+  auto Kind = static_cast(*d++

[clang-tools-extra] r336849 - [Documentation] Link format and order of Clang-tidy changes in Release Notes

2018-07-11 Thread Eugene Zelenko via cfe-commits
Author: eugenezelenko
Date: Wed Jul 11 13:41:16 2018
New Revision: 336849

URL: http://llvm.org/viewvc/llvm-project?rev=336849&view=rev
Log:
[Documentation] Link format and order of Clang-tidy changes in Release Notes

Modified:
clang-tools-extra/trunk/docs/ReleaseNotes.rst

Modified: clang-tools-extra/trunk/docs/ReleaseNotes.rst
URL: 
http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/docs/ReleaseNotes.rst?rev=336849&r1=336848&r2=336849&view=diff
==
--- clang-tools-extra/trunk/docs/ReleaseNotes.rst (original)
+++ clang-tools-extra/trunk/docs/ReleaseNotes.rst Wed Jul 11 13:41:16 2018
@@ -95,6 +95,16 @@ Improvements to clang-tidy
 
   Warns on unused function return values.
 
+- New :doc:`cert-msc32-c
+  ` check
+
+  Detects inappropriate seeding of ``srand()`` function.
+
+- New :doc:`cert-msc51-cpp
+  ` check
+
+  Detects inappropriate seeding of C++ random generators and C ``srand()`` 
function.
+  
 - New :doc:`cppcoreguidelines-avoid-goto
   ` check.
 
@@ -253,17 +263,6 @@ Improvements to clang-tidy
 
 - The 'google-runtime-member-string-references' check was removed.
 
-- New `cert-msc51-cpp
-  
`_
 check
-
-  Detects inappropriate seeding of C++ random generators and C ``srand()`` 
function.
-  
-- New `cert-msc32-c
-  
`_
 check
-
-  Detects inappropriate seeding of ``srand()`` function.
-
-
 Improvements to include-fixer
 -
 


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


[clang-tools-extra] r336850 - [Documentation] Fix incorrect documentation references, new checks order in Release Notes

2018-07-11 Thread Eugene Zelenko via cfe-commits
Author: eugenezelenko
Date: Wed Jul 11 13:56:26 2018
New Revision: 336850

URL: http://llvm.org/viewvc/llvm-project?rev=336850&view=rev
Log:
[Documentation] Fix incorrect documentation references, new checks order in 
Release Notes

Modified:
clang-tools-extra/trunk/docs/ReleaseNotes.rst

Modified: clang-tools-extra/trunk/docs/ReleaseNotes.rst
URL: 
http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/docs/ReleaseNotes.rst?rev=336850&r1=336849&r2=336850&view=diff
==
--- clang-tools-extra/trunk/docs/ReleaseNotes.rst (original)
+++ clang-tools-extra/trunk/docs/ReleaseNotes.rst Wed Jul 11 13:56:26 2018
@@ -67,6 +67,12 @@ Improvements to clang-tidy
 
 - New module ``zircon`` for checks related to Fuchsia's Zircon kernel.
 
+- New :doc:`abseil-string-find-startswith
+  ` check.
+
+  Checks whether a ``std::string::find()`` result is compared with 0, and
+  suggests replacing with ``absl::StartsWith()``.
+
 - New :doc:`android-comparison-in-temp-failure-retry
   ` check.
 
@@ -96,12 +102,12 @@ Improvements to clang-tidy
   Warns on unused function return values.
 
 - New :doc:`cert-msc32-c
-  ` check
+  ` check
 
   Detects inappropriate seeding of ``srand()`` function.
 
 - New :doc:`cert-msc51-cpp
-  ` check
+  ` check
 
   Detects inappropriate seeding of C++ random generators and C ``srand()`` 
function.
   
@@ -122,12 +128,6 @@ Improvements to clang-tidy
 
   Warns if a class inherits from multiple classes that are not pure virtual.
 
-- New :doc:`abseil-string-find-startswith
-  ` check.
-
-  Checks whether a ``std::string::find()`` result is compared with 0, and
-  suggests replacing with ``absl::StartsWith()``.
-
 - New `fuchsia-restrict-system-includes
   
`_
 check
 


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


[clang-tools-extra] r337069 - [Documentation] Add missing description for bugprone-exception-escape in Release Notes.

2018-07-13 Thread Eugene Zelenko via cfe-commits
Author: eugenezelenko
Date: Fri Jul 13 15:53:05 2018
New Revision: 337069

URL: http://llvm.org/viewvc/llvm-project?rev=337069&view=rev
Log:
[Documentation] Add missing description for bugprone-exception-escape in 
Release Notes.

Modified:
clang-tools-extra/trunk/docs/ReleaseNotes.rst

Modified: clang-tools-extra/trunk/docs/ReleaseNotes.rst
URL: 
http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/docs/ReleaseNotes.rst?rev=337069&r1=337068&r2=337069&view=diff
==
--- clang-tools-extra/trunk/docs/ReleaseNotes.rst (original)
+++ clang-tools-extra/trunk/docs/ReleaseNotes.rst Fri Jul 13 15:53:05 2018
@@ -82,6 +82,9 @@ Improvements to clang-tidy
 - New :doc:`bugprone-exception-escape
   ` check
 
+  Finds functions which may throw an exception directly or indirectly, but they
+  should not.
+
 - New :doc:`bugprone-parent-virtual-call
   ` check.
 


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


Re: [PATCH] D21863: Fix typo in atomic macros

2016-09-19 Thread Eugene Zelenko via cfe-commits
Eugene.Zelenko added a subscriber: Eugene.Zelenko.
Eugene.Zelenko closed this revision.
Eugene.Zelenko added a comment.

Committed in r280607.


https://reviews.llvm.org/D21863



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


Re: [PATCH] D22577: Include unreferenced nested types in member list only for CodeView

2016-09-19 Thread Eugene Zelenko via cfe-commits
Eugene.Zelenko added a subscriber: Eugene.Zelenko.
Eugene.Zelenko closed this revision.
Eugene.Zelenko added a comment.

Committed in r276271. Please specify Differential revision in commit message.


https://reviews.llvm.org/D22577



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


Re: [PATCH] D20392: [CodeView] Modify emitTypeInformation to use MemoryTypeTableBuilder

2016-09-19 Thread Eugene Zelenko via cfe-commits
Eugene.Zelenko added a subscriber: Eugene.Zelenko.
Eugene.Zelenko closed this revision.
Eugene.Zelenko added a comment.

Committed in r270106.


https://reviews.llvm.org/D20392



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


Re: [PATCH] D10857: Update documentation for unroll pragmas on loops with runtime trip counts

2016-09-21 Thread Eugene Zelenko via cfe-commits
Eugene.Zelenko added a subscriber: Eugene.Zelenko.
Eugene.Zelenko closed this revision.
Eugene.Zelenko added a comment.

Committed in r242048.


https://reviews.llvm.org/D10857



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


Re: [PATCH] D20014: [libc++] Explicit return in non-void function

2016-09-22 Thread Eugene Zelenko via cfe-commits
Eugene.Zelenko added a subscriber: Eugene.Zelenko.
Eugene.Zelenko closed this revision.
Eugene.Zelenko added a comment.

Committed in r269298.


https://reviews.llvm.org/D20014



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


Re: [PATCH] D21677: Add ignoringImplicit matcher

2016-09-22 Thread Eugene Zelenko via cfe-commits
Eugene.Zelenko added a subscriber: Eugene.Zelenko.
Eugene.Zelenko closed this revision.
Eugene.Zelenko added a comment.

Committed in r273659. Please specify Differential revision in commit message.


Repository:
  rL LLVM

https://reviews.llvm.org/D21677



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


Re: [PATCH] D21343: Implement `lcm` and `gcd` from library fundamentals V2

2016-09-22 Thread Eugene Zelenko via cfe-commits
Eugene.Zelenko added a subscriber: Eugene.Zelenko.
Eugene.Zelenko closed this revision.
Eugene.Zelenko added a comment.

Committed in r276750.


https://reviews.llvm.org/D21343



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


Re: [PATCH] D21022: [ARM] Fix linker emulation for arm 32 big endian

2016-09-22 Thread Eugene Zelenko via cfe-commits
Eugene.Zelenko added a subscriber: Eugene.Zelenko.
Eugene.Zelenko closed this revision.
Eugene.Zelenko added a comment.

Committed in r272402.


https://reviews.llvm.org/D21022



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


Re: [PATCH] D22270: [ASTImporter] Properly report the locations of anonymous structs declared as part of named fields

2016-09-23 Thread Eugene Zelenko via cfe-commits
Eugene.Zelenko added a subscriber: Eugene.Zelenko.
Eugene.Zelenko closed this revision.
Eugene.Zelenko added a comment.

Committed in r275460.


Repository:
  rL LLVM

https://reviews.llvm.org/D22270



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


Re: [PATCH] D19854: Define Contiki OS toolchain

2016-09-23 Thread Eugene Zelenko via cfe-commits
Eugene.Zelenko added a subscriber: Eugene.Zelenko.
Eugene.Zelenko added a comment.

Looks like patch was not committed.


https://reviews.llvm.org/D19854



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


Re: [PATCH] D19260: [analyzer][scan-build-py] subprocess output handling reviewed in clang module

2016-09-23 Thread Eugene Zelenko via cfe-commits
Eugene.Zelenko added a subscriber: Eugene.Zelenko.
Eugene.Zelenko added a comment.

Looks like patch was not committed.


https://reviews.llvm.org/D19260



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


Re: [PATCH] D19170: [safestack] Link SafeStack runtime only when not using separate stack segment

2016-09-23 Thread Eugene Zelenko via cfe-commits
Eugene.Zelenko added a subscriber: Eugene.Zelenko.
Eugene.Zelenko added a comment.

Looks like patch was not committed.


https://reviews.llvm.org/D19170



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


Re: [PATCH] D19170: [safestack] Link SafeStack runtime only when not using separate stack segment

2016-09-23 Thread Eugene Zelenko via cfe-commits
Eugene.Zelenko added a comment.

Please add dependencies to Differential revisions, so reasons for holding will 
be clear.


https://reviews.llvm.org/D19170



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


Re: [PATCH] D24881: [clang-tidy] Cleaning up language options.

2016-09-23 Thread Eugene Zelenko via cfe-commits
Eugene.Zelenko added a subscriber: Eugene.Zelenko.
Eugene.Zelenko added a comment.

I think will be good idea to enable modernize-loop-convert, modernize-use-auto, 
modernize-use-default, modernize-use-nullptr only in C++11 mode.

Probably modernize-avoid-bind code code be simplified too.


Repository:
  rL LLVM

https://reviews.llvm.org/D24881



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


Re: [PATCH] D24881: [clang-tidy] Cleaning up language options.

2016-09-23 Thread Eugene Zelenko via cfe-commits
Eugene.Zelenko added a comment.

I think it's reasonable to compile code in C++11 with minimal changes (only 
modernize-replace-auto-ptr is really needed) and test it before further 
modernization.


Repository:
  rL LLVM

https://reviews.llvm.org/D24881



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


Re: [PATCH] D18639: Use __builtin_isnan/isinf/isfinite in complex

2016-09-23 Thread Eugene Zelenko via cfe-commits
Eugene.Zelenko added a subscriber: Eugene.Zelenko.
Eugene.Zelenko added a comment.

Looks like patch was not committed.


https://reviews.llvm.org/D18639



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


Re: [PATCH] D18325: export additional header modules from xmmintrin

2016-09-23 Thread Eugene Zelenko via cfe-commits
Eugene.Zelenko added a subscriber: Eugene.Zelenko.
Eugene.Zelenko closed this revision.
Eugene.Zelenko added a comment.

Committed in r264092.


https://reviews.llvm.org/D18325



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


Re: [PATCH] D17979: [OPENMP] Add regression test for codegen of distribute pragma for NVPTX

2016-09-26 Thread Eugene Zelenko via cfe-commits
Eugene.Zelenko added a subscriber: Eugene.Zelenko.
Eugene.Zelenko added a comment.

Looks like patch was not committed.


Repository:
  rL LLVM

https://reviews.llvm.org/D17979



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


Re: [PATCH] D17890: [OpenMP][NVPTX][CUDA] Adding support for printf for an NVPTX OpenMP device.

2016-09-26 Thread Eugene Zelenko via cfe-commits
Eugene.Zelenko added a subscriber: Eugene.Zelenko.
Eugene.Zelenko added a comment.

Looks like patch was not committed.


https://reviews.llvm.org/D17890



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


Re: [PATCH] D17840: [OPENMP] Private, firstprivate, and lastprivate clauses for distribute, host code generation

2016-09-26 Thread Eugene Zelenko via cfe-commits
Eugene.Zelenko added a subscriber: Eugene.Zelenko.
Eugene.Zelenko added a comment.

Looks like patch was not committed.


Repository:
  rL LLVM

https://reviews.llvm.org/D17840



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


Re: [PATCH] D17469: [libcxx] Add deployment knobs to tests (for Apple platforms)

2016-09-26 Thread Eugene Zelenko via cfe-commits
Eugene.Zelenko added a subscriber: Eugene.Zelenko.
Eugene.Zelenko added a comment.

Looks like patch was not committed.


https://reviews.llvm.org/D17469



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


Re: [PATCH] D17469: [libcxx] Add deployment knobs to tests (for Apple platforms)

2016-09-26 Thread Eugene Zelenko via cfe-commits
Eugene.Zelenko added a comment.

It's fine. I just walk through all accepted revisions to find forgotten ones.


https://reviews.llvm.org/D17469



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


Re: [PATCH] D16951: [MS ABI] dllimport'd class cannot have constexpr ctors

2016-09-26 Thread Eugene Zelenko via cfe-commits
Eugene.Zelenko added a subscriber: Eugene.Zelenko.
Eugene.Zelenko added a comment.

Looks like patch was not committed.


https://reviews.llvm.org/D16951



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


Re: [PATCH] D16761: clang-cl: Support loading plugins on Windows

2016-09-26 Thread Eugene Zelenko via cfe-commits
Eugene.Zelenko added a subscriber: Eugene.Zelenko.
Eugene.Zelenko added a comment.

Was committed in r260265, but reverted in r260536.


https://reviews.llvm.org/D16761



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


Re: [PATCH] D16262: [libc++] Treat trailing backslashes in a regex pattern as invalid.

2016-09-26 Thread Eugene Zelenko via cfe-commits
Eugene.Zelenko added a subscriber: Eugene.Zelenko.
Eugene.Zelenko closed this revision.
Eugene.Zelenko added a comment.

Committed in r258107.


https://reviews.llvm.org/D16262



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


Re: [PATCH] D15994: Allow for unfinished #if blocks in preambles.

2016-09-26 Thread Eugene Zelenko via cfe-commits
Eugene.Zelenko added a subscriber: Eugene.Zelenko.
Eugene.Zelenko added a comment.

Looks like patch was not committed.


https://reviews.llvm.org/D15994



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


Re: [PATCH] D15691: [OpenCL] Improving OpenCL function pointer error checking to catch lone function designator

2016-09-26 Thread Eugene Zelenko via cfe-commits
Eugene.Zelenko added a subscriber: Eugene.Zelenko.
Eugene.Zelenko added a comment.

Committed in https://reviews.llvm.org/rL256838.


https://reviews.llvm.org/D15691



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


Re: [PATCH] D15643: [clang-format] Don't allow newline after uppercase Obj-C block return types

2016-09-26 Thread Eugene Zelenko via cfe-commits
Eugene.Zelenko added a subscriber: Eugene.Zelenko.
Eugene.Zelenko added a comment.

Looks like patch was not committed.


https://reviews.llvm.org/D15643



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


Re: [PATCH] D14353: Allow use of private headers in different sub-modules.

2016-09-26 Thread Eugene Zelenko via cfe-commits
Eugene.Zelenko added a subscriber: Eugene.Zelenko.
Eugene.Zelenko closed this revision.
Eugene.Zelenko added a comment.

Committed in https://reviews.llvm.org/rL252170.


https://reviews.llvm.org/D14353



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


Re: [PATCH] D14259: The maximum alignment of std::aligned_storage applies to all Windows compilers

2016-09-26 Thread Eugene Zelenko via cfe-commits
Eugene.Zelenko added a subscriber: Eugene.Zelenko.
Eugene.Zelenko added a comment.

Looks like patch was not committed.


https://reviews.llvm.org/D14259



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


Re: [PATCH] D13891: Apply modernize-use-default to llvm.

2016-09-26 Thread Eugene Zelenko via cfe-commits
Eugene.Zelenko added a subscriber: Eugene.Zelenko.
Eugene.Zelenko added a comment.

Looks like patch was not committed.


https://reviews.llvm.org/D13891



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


Re: [PATCH] D13813: Teach MyriadToolchain how to find its C++ header paths.

2016-09-26 Thread Eugene Zelenko via cfe-commits
Eugene.Zelenko added a subscriber: Eugene.Zelenko.
Eugene.Zelenko closed this revision.
Eugene.Zelenko added a comment.

Committed in https://reviews.llvm.org/rL250536.


https://reviews.llvm.org/D13813



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


Re: [PATCH] D13419: Fix several problems at the intersection of template instantiations and visibility

2016-09-26 Thread Eugene Zelenko via cfe-commits
Eugene.Zelenko added a subscriber: Eugene.Zelenko.
Eugene.Zelenko added a comment.

Looks like patch was not committed.


Repository:
  rL LLVM

https://reviews.llvm.org/D13419



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


Re: [PATCH] D13349: [OpenCL] Casting boolean to an integer vector in OpenCL should set all bits if boolean is true

2016-09-26 Thread Eugene Zelenko via cfe-commits
Eugene.Zelenko added a subscriber: Eugene.Zelenko.
Eugene.Zelenko closed this revision.
Eugene.Zelenko added a comment.

Committed in https://reviews.llvm.org/rL249301.


https://reviews.llvm.org/D13349



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


Re: [PATCH] D13280: [OpenCL] Adding reserved operator logical xor for OpenCL

2016-09-26 Thread Eugene Zelenko via cfe-commits
Eugene.Zelenko added a subscriber: Eugene.Zelenko.
Eugene.Zelenko closed this revision.
Eugene.Zelenko added a comment.

Committed in https://reviews.llvm.org/rL259651.


https://reviews.llvm.org/D13280



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


Re: [PATCH] D12505: [X86] Set MaxVectorAlign for non-Darwin targets as well.

2016-09-27 Thread Eugene Zelenko via cfe-commits
Eugene.Zelenko added a subscriber: Eugene.Zelenko.
Eugene.Zelenko added a comment.

Looks like patch was not committed.


https://reviews.llvm.org/D12505



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


Re: [PATCH] D11472: [ARM] Pass subtarget feature "+strict-align" instead of backend option "arm-strict-align"

2016-09-27 Thread Eugene Zelenko via cfe-commits
Eugene.Zelenko added a subscriber: Eugene.Zelenko.
Eugene.Zelenko closed this revision.
Eugene.Zelenko added a comment.

Committed in https://reviews.llvm.org/rL243489.


https://reviews.llvm.org/D11472



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


Re: [PATCH] D11235: clang-format: Fix breaking before nested 'operator' in function declarations

2016-09-27 Thread Eugene Zelenko via cfe-commits
Eugene.Zelenko added a subscriber: Eugene.Zelenko.
Eugene.Zelenko added a comment.

Looks like patch was not committed.


https://reviews.llvm.org/D11235



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


Re: [PATCH] D10370: clang-format: Implement AlwaysBreakAfterDeclarationReturnType.

2016-09-27 Thread Eugene Zelenko via cfe-commits
Eugene.Zelenko added a subscriber: Eugene.Zelenko.
Eugene.Zelenko closed this revision.
Eugene.Zelenko added a comment.

Committed in https://reviews.llvm.org/rL256046.


https://reviews.llvm.org/D10370



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


Re: [PATCH] D9127: PR23175 (fix) - Infinite loop iterating Objective-C method declarations in categories when the AST was deserialized from an .ast file

2016-09-27 Thread Eugene Zelenko via cfe-commits
Eugene.Zelenko added a subscriber: Eugene.Zelenko.
Eugene.Zelenko added a comment.

Looks like patch was not committed.


Repository:
  rL LLVM

https://reviews.llvm.org/D9127



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


Re: [PATCH] D25024: [clang-tidy] Add check for detecting declarations with multiple names

2016-09-28 Thread Eugene Zelenko via cfe-commits
Eugene.Zelenko added a subscriber: Eugene.Zelenko.
Eugene.Zelenko added a comment.

Please mention this check in docs/ReleaseNotes.rst (in alphabetical order).


https://reviews.llvm.org/D25024



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


Re: [PATCH] D25024: [clang-tidy] Add check for detecting declarations with multiple names

2016-09-28 Thread Eugene Zelenko via cfe-commits
Eugene.Zelenko added inline comments.


Comment at: clang-tidy/cppcoreguidelines/OneNamePerDeclarationCheck.cpp:26
@@ +25,3 @@
+
+} // end anonymous namespace
+

Namespace is inconsistent with following ones. It I'm not mistaken, **// 
namespace** is prevailing form in CLang-tidy code.


https://reviews.llvm.org/D25024



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


Re: [PATCH] D25024: [clang-tidy] Add check for detecting declarations with multiple names

2016-09-28 Thread Eugene Zelenko via cfe-commits
Eugene.Zelenko added inline comments.


Comment at: docs/ReleaseNotes.rst:62
@@ -60,1 +61,3 @@
+  
`_
 check
+
 - New `cppcoreguidelines-slicing

Please add one sentence description. Probably //Checks for declarations with 
multiple names.// should be enough.


https://reviews.llvm.org/D25024



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


Re: [PATCH] D8048: TypePrinter print __restrict if not in C99 mode

2016-09-28 Thread Eugene Zelenko via cfe-commits
Eugene.Zelenko added a subscriber: Eugene.Zelenko.
Eugene.Zelenko closed this revision.
Eugene.Zelenko added a comment.

Committed in https://reviews.llvm.org/rL231179.


https://reviews.llvm.org/D8048



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


Re: [PATCH] D5789: C99 partial re-initialization behavior (DR-253)

2016-09-28 Thread Eugene Zelenko via cfe-commits
Eugene.Zelenko added a subscriber: Eugene.Zelenko.
Eugene.Zelenko closed this revision.
Eugene.Zelenko added a comment.

Committed in https://reviews.llvm.org/rL239446.


https://reviews.llvm.org/D5789



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


Re: [PATCH] D5109: Fix "#pragma clang __debug overflow_stack" for MSVC builds

2016-09-28 Thread Eugene Zelenko via cfe-commits
Eugene.Zelenko added a subscriber: Eugene.Zelenko.
Eugene.Zelenko added a comment.

Looks like patch was not committed. Does it still make sense?


https://reviews.llvm.org/D5109



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


Re: [PATCH] D5041: Fix for clang_Cursor_getSpellingNameRange() reportage of C++ functions

2016-09-28 Thread Eugene Zelenko via cfe-commits
Eugene.Zelenko added a subscriber: Eugene.Zelenko.
Eugene.Zelenko closed this revision.
Eugene.Zelenko added a comment.

Committed in https://reviews.llvm.org/rL216480.


https://reviews.llvm.org/D5041



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


[PATCH] D4687: MS ABI: Downgrade inheritance model mismatches to a warning sometimes

2016-10-03 Thread Eugene Zelenko via cfe-commits
Eugene.Zelenko added a comment.

Looks like patch was not committed.


https://reviews.llvm.org/D4687



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


[PATCH] D4362: Fix for Bug 19480 -- Adding a test case.

2016-10-03 Thread Eugene Zelenko via cfe-commits
Eugene.Zelenko closed this revision.
Eugene.Zelenko added a comment.

Committed in https://reviews.llvm.org/rL213987.


https://reviews.llvm.org/D4362



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


[PATCH] D3922: Take into account PrintingPolicy::SuppressUnwrittenScope in NamedDecl::printQualifiedName.

2016-10-03 Thread Eugene Zelenko via cfe-commits
Eugene.Zelenko closed this revision.
Eugene.Zelenko added a comment.

Committed in https://reviews.llvm.org/rL209924.


https://reviews.llvm.org/D3922



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


[PATCH] D3771: clang-cl: Add support for -o

2016-10-03 Thread Eugene Zelenko via cfe-commits
Eugene.Zelenko added a comment.

Looks like patch was not committed.


https://reviews.llvm.org/D3771



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


[PATCH] D3065: Implementation of #pragma (data|code|const|bss)_seg

2016-10-03 Thread Eugene Zelenko via cfe-commits
Eugene.Zelenko closed this revision.
Eugene.Zelenko added a comment.

Committed in https://reviews.llvm.org/rL205810.


https://reviews.llvm.org/D3065



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


[PATCH] D2600: [clang-cl] Added _InterlockedCompareExchangePointer to Intrin.h

2016-10-03 Thread Eugene Zelenko via cfe-commits
Eugene.Zelenko closed this revision.
Eugene.Zelenko added a comment.

Committed in https://reviews.llvm.org/rL200239.


https://reviews.llvm.org/D2600



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


[PATCH] D2088: Implement aarch64 neon instructio​n class SIMD Crypto - LLVM

2016-10-03 Thread Eugene Zelenko via cfe-commits
Eugene.Zelenko closed this revision.
Eugene.Zelenko added a comment.

Committed in https://reviews.llvm.org/rL194085.


https://reviews.llvm.org/D2088



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


  1   2   3   4   5   6   >