<div dir="ltr">(Cost as in "shared library buildsof clang are ~35% slower than regular clang" last we checked.)</div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jun 4, 2018 at 2:14 PM, Nico Weber <span dir="ltr"><<a href="mailto:thakis@chromium.org" target="_blank">thakis@chromium.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Sure, the bots could do that, the more general point was that many (probably most) people who want to enable asserts don't want to use shared libs. I believe that only a few people use that config, so turning things around why should everyone building with asserts have to pay the cost of supporting the shared build config?</div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jun 4, 2018 at 12:51 PM, David Zarzycki <span dir="ltr"><<a href="mailto:dave@znu.io" target="_blank">dave@znu.io</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Roman – I agree that people shouldn’t need to manually fix this every time it happens.<br>
<br>
Hi Nico – What is stopping the Chromium buildbots from setting BUILD_SHARED_LIBS to false? That way the default BUILD_SHARED_LIBS policy of llvm and/or clang doesn’t matter, right?<br>
<br>
Dave<br>
<div class="m_6327405296854549612HOEnZb"><div class="m_6327405296854549612h5"><br>
<br>
> On Jun 4, 2018, at 12:40 PM, Roman Lebedev <<a href="mailto:lebedev.ri@gmail.com" target="_blank">lebedev.ri@gmail.com</a>> wrote:<br>
> <br>
> This is n-th time i do this kind of fix.<br>
> Sure this does resolve the issue, but it would be much better to use<br>
> proper means,<br>
> and tell people to fix their code, in an automatic way :)<br>
> <br>
> On Mon, Jun 4, 2018 at 7:36 PM, Nico Weber <<a href="mailto:thakis@chromium.org" target="_blank">thakis@chromium.org</a>> wrote:<br>
>> All chromium bots build with asserts on and we definitely don't want shared<br>
>> libs :-) Having the people who care about this build config make sure it<br>
>> keeps working seems like a good approach to me.<br>
>> <br>
>> On Mon, Jun 4, 2018 at 8:15 AM, David Zarzycki via cfe-commits<br>
>> <<a href="mailto:cfe-commits@lists.llvm.org" target="_blank">cfe-commits@lists.llvm.org</a>> wrote:<br>
>>> <br>
>>> What’s stopping the project from automatically setting BUILD_SHARED_LIBS<br>
>>> to TRUE if asserts are enabled? That’d automatically “force” active<br>
>>> developers to test the scenario on their local machines, but not change the<br>
>>> way release builds work.<br>
>>> <br>
>>> <br>
>>>> On Jun 4, 2018, at 8:11 AM, Roman Lebedev via cfe-commits<br>
>>>> <<a href="mailto:cfe-commits@lists.llvm.org" target="_blank">cfe-commits@lists.llvm.org</a>> wrote:<br>
>>>> <br>
>>>> This broke building as shared libraries.<br>
>>>> <br>
>>>> I've committed the fix, but the bot coverage is clearly severely<br>
>>>> missing,<br>
>>>> given that such breakages are very often.<br>
>>>> <br>
>>>> Roman.<br>
>>>> <br>
>>>> On Mon, Jun 4, 2018 at 12:04 PM, Eric Liu via cfe-commits<br>
>>>> <<a href="mailto:cfe-commits@lists.llvm.org" target="_blank">cfe-commits@lists.llvm.org</a>> wrote:<br>
>>>>> Author: ioeric<br>
>>>>> Date: Mon Jun  4 02:04:12 2018<br>
>>>>> New Revision: 333874<br>
>>>>> <br>
>>>>> URL: <a href="http://llvm.org/viewvc/llvm-project?rev=333874&view=rev" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-pr<wbr>oject?rev=333874&view=rev</a><br>
>>>>> Log:<br>
>>>>> Reland "Move #include manipulation code to new lib/Tooling/Inclusions."<br>
>>>>> <br>
>>>>> This reverts commit r333534 (i.e. reland r332720) after fixing module<br>
>>>>> build.<br>
>>>>> <br>
>>>>> Differential Revision: <a href="https://reviews.llvm.org/D47068" rel="noreferrer" target="_blank">https://reviews.llvm.org/D4706<wbr>8</a><br>
>>>>> <br>
>>>>> Added:<br>
>>>>>   cfe/trunk/include/clang/Tooli<wbr>ng/Inclusions/HeaderIncludes.h<br>
>>>>>     - copied, changed from r333865,<br>
>>>>> cfe/trunk/include/clang/Toolin<wbr>g/Core/HeaderIncludes.h<br>
>>>>>   cfe/trunk/include/clang/Tooli<wbr>ng/Inclusions/IncludeStyle.h<br>
>>>>>     - copied, changed from r333865,<br>
>>>>> cfe/trunk/include/clang/Toolin<wbr>g/Core/IncludeStyle.h<br>
>>>>>   cfe/trunk/lib/Tooling/Inclusi<wbr>ons/CMakeLists.txt<br>
>>>>>     - copied, changed from r333865,<br>
>>>>> cfe/trunk/lib/Tooling/Core/CMa<wbr>keLists.txt<br>
>>>>>   cfe/trunk/lib/Tooling/Inclusi<wbr>ons/HeaderIncludes.cpp<br>
>>>>>     - copied, changed from r333865,<br>
>>>>> cfe/trunk/lib/Tooling/Core/Hea<wbr>derIncludes.cpp<br>
>>>>>   cfe/trunk/lib/Tooling/Inclusi<wbr>ons/IncludeStyle.cpp<br>
>>>>>     - copied, changed from r333865,<br>
>>>>> cfe/trunk/lib/Tooling/Core/Inc<wbr>ludeStyle.cpp<br>
>>>>> Removed:<br>
>>>>>   cfe/trunk/include/clang/Tooli<wbr>ng/Core/HeaderIncludes.h<br>
>>>>>   cfe/trunk/include/clang/Tooli<wbr>ng/Core/IncludeStyle.h<br>
>>>>>   cfe/trunk/lib/Tooling/Core/He<wbr>aderIncludes.cpp<br>
>>>>>   cfe/trunk/lib/Tooling/Core/In<wbr>cludeStyle.cpp<br>
>>>>> Modified:<br>
>>>>>   cfe/trunk/include/clang/Forma<wbr>t/Format.h<br>
>>>>>   cfe/trunk/include/clang/modul<wbr>e.modulemap<br>
>>>>>   cfe/trunk/lib/Format/CMakeLis<wbr>ts.txt<br>
>>>>>   cfe/trunk/lib/Format/Format.c<wbr>pp<br>
>>>>>   cfe/trunk/lib/Tooling/CMakeLi<wbr>sts.txt<br>
>>>>>   cfe/trunk/lib/Tooling/Core/CM<wbr>akeLists.txt<br>
>>>>>   cfe/trunk/unittests/Tooling/H<wbr>eaderIncludesTest.cpp<br>
>>>>> <br>
>>>>> Modified: cfe/trunk/include/clang/Format<wbr>/Format.h<br>
>>>>> URL:<br>
>>>>> <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Format/Format.h?rev=333874&r1=333873&r2=333874&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-pr<wbr>oject/cfe/trunk/include/clang/<wbr>Format/Format.h?rev=333874&r1=<wbr>333873&r2=333874&view=diff</a><br>
>>>>> <br>
>>>>> ==============================<wbr>==============================<wbr>==================<br>
>>>>> --- cfe/trunk/include/clang/Format<wbr>/Format.h (original)<br>
>>>>> +++ cfe/trunk/include/clang/Format<wbr>/Format.h Mon Jun  4 02:04:12 2018<br>
>>>>> @@ -16,8 +16,8 @@<br>
>>>>> #define LLVM_CLANG_FORMAT_FORMAT_H<br>
>>>>> <br>
>>>>> #include "clang/Basic/LangOptions.h"<br>
>>>>> -#include "clang/Tooling/Core/IncludeSty<wbr>le.h"<br>
>>>>> #include "clang/Tooling/Core/Replacemen<wbr>t.h"<br>
>>>>> +#include "clang/Tooling/Inclusions/Incl<wbr>udeStyle.h"<br>
>>>>> #include "llvm/ADT/ArrayRef.h"<br>
>>>>> #include "llvm/Support/Regex.h"<br>
>>>>> #include <system_error><br>
>>>>> <br>
>>>>> Removed: cfe/trunk/include/clang/Toolin<wbr>g/Core/HeaderIncludes.h<br>
>>>>> URL:<br>
>>>>> <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Tooling/Core/HeaderIncludes.h?rev=333873&view=auto" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-pr<wbr>oject/cfe/trunk/include/clang/<wbr>Tooling/Core/HeaderIncludes.h?<wbr>rev=333873&view=auto</a><br>
>>>>> <br>
>>>>> ==============================<wbr>==============================<wbr>==================<br>
>>>>> --- cfe/trunk/include/clang/Toolin<wbr>g/Core/HeaderIncludes.h (original)<br>
>>>>> +++ cfe/trunk/include/clang/Toolin<wbr>g/Core/HeaderIncludes.h (removed)<br>
>>>>> @@ -1,137 +0,0 @@<br>
>>>>> -//===--- HeaderIncludes.h - Insert/Delete #includes for C++ code--*-<br>
>>>>> C++-*-===//<br>
>>>>> -//<br>
>>>>> -//                     The LLVM Compiler Infrastructure<br>
>>>>> -//<br>
>>>>> -// This file is distributed under the University of Illinois Open<br>
>>>>> Source<br>
>>>>> -// License. See LICENSE.TXT for details.<br>
>>>>> -//<br>
>>>>> <br>
>>>>> -//===------------------------<wbr>------------------------------<wbr>----------------===//<br>
>>>>> -<br>
>>>>> -#ifndef LLVM_CLANG_TOOLING_CORE_HEADER<wbr>INCLUDES_H<br>
>>>>> -#define LLVM_CLANG_TOOLING_CORE_HEADER<wbr>INCLUDES_H<br>
>>>>> -<br>
>>>>> -#include "clang/Basic/SourceManager.h"<br>
>>>>> -#include "clang/Tooling/Core/Replacemen<wbr>t.h"<br>
>>>>> -#include "clang/Tooling/Core/IncludeSty<wbr>le.h"<br>
>>>>> -#include "llvm/Support/Path.h"<br>
>>>>> -#include "llvm/Support/Regex.h"<br>
>>>>> -#include <unordered_map><br>
>>>>> -<br>
>>>>> -namespace clang {<br>
>>>>> -namespace tooling {<br>
>>>>> -<br>
>>>>> -/// This class manages priorities of C++ #include categories and<br>
>>>>> calculates<br>
>>>>> -/// priorities for headers.<br>
>>>>> -/// FIXME(ioeric): move this class into implementation file when<br>
>>>>> clang-format's<br>
>>>>> -/// include sorting functions are also moved here.<br>
>>>>> -class IncludeCategoryManager {<br>
>>>>> -public:<br>
>>>>> -  IncludeCategoryManager(const IncludeStyle &Style, StringRef<br>
>>>>> FileName);<br>
>>>>> -<br>
>>>>> -  /// Returns the priority of the category which \p IncludeName<br>
>>>>> belongs to.<br>
>>>>> -  /// If \p CheckMainHeader is true and \p IncludeName is a main<br>
>>>>> header, returns<br>
>>>>> -  /// 0. Otherwise, returns the priority of the matching category or<br>
>>>>> INT_MAX.<br>
>>>>> -  /// NOTE: this API is not thread-safe!<br>
>>>>> -  int getIncludePriority(StringRef IncludeName, bool CheckMainHeader)<br>
>>>>> const;<br>
>>>>> -<br>
>>>>> -private:<br>
>>>>> -  bool isMainHeader(StringRef IncludeName) const;<br>
>>>>> -<br>
>>>>> -  const IncludeStyle Style;<br>
>>>>> -  bool IsMainFile;<br>
>>>>> -  std::string FileName;<br>
>>>>> -  // This refers to a substring in FileName.<br>
>>>>> -  StringRef FileStem;<br>
>>>>> -  // Regex is not thread-safe.<br>
>>>>> -  mutable SmallVector<llvm::Regex, 4> CategoryRegexs;<br>
>>>>> -};<br>
>>>>> -<br>
>>>>> -/// Generates replacements for inserting or deleting #include<br>
>>>>> directives in a<br>
>>>>> -/// file.<br>
>>>>> -class HeaderIncludes {<br>
>>>>> -public:<br>
>>>>> -  HeaderIncludes(llvm::StringRef FileName, llvm::StringRef Code,<br>
>>>>> -                 const IncludeStyle &Style);<br>
>>>>> -<br>
>>>>> -  /// Inserts an #include directive of \p Header into the code. If \p<br>
>>>>> IsAngled<br>
>>>>> -  /// is true, \p Header will be quoted with <> in the directive;<br>
>>>>> otherwise, it<br>
>>>>> -  /// will be quoted with "".<br>
>>>>> -  ///<br>
>>>>> -  /// When searching for points to insert new header, this ignores<br>
>>>>> #include's<br>
>>>>> -  /// after the #include block(s) in the beginning of a file to avoid<br>
>>>>> inserting<br>
>>>>> -  /// headers into code sections where new #include's should not be<br>
>>>>> added by<br>
>>>>> -  /// default. These code sections include:<br>
>>>>> -  ///   - raw string literals (containing #include).<br>
>>>>> -  ///   - #if blocks.<br>
>>>>> -  ///   - Special #include's among declarations (e.g. functions).<br>
>>>>> -  ///<br>
>>>>> -  /// Returns a replacement that inserts the new header into a<br>
>>>>> suitable #include<br>
>>>>> -  /// block of the same category. This respects the order of the<br>
>>>>> existing<br>
>>>>> -  /// #includes in the block; if the existing #includes are not<br>
>>>>> already sorted,<br>
>>>>> -  /// this will simply insert the #include in front of the first<br>
>>>>> #include of the<br>
>>>>> -  /// same category in the code that should be sorted after \p<br>
>>>>> IncludeName. If<br>
>>>>> -  /// \p IncludeName already exists (with exactly the same spelling),<br>
>>>>> this<br>
>>>>> -  /// returns None.<br>
>>>>> -  llvm::Optional<tooling::Replac<wbr>ement> insert(llvm::StringRef Header,<br>
>>>>> -                                              bool IsAngled) const;<br>
>>>>> -<br>
>>>>> -  /// Removes all existing #includes of \p Header quoted with <> if \p<br>
>>>>> IsAngled<br>
>>>>> -  /// is true or "" if \p IsAngled is false.<br>
>>>>> -  /// This doesn't resolve the header file path; it only deletes<br>
>>>>> #includes with<br>
>>>>> -  /// exactly the same spelling.<br>
>>>>> -  tooling::Replacements remove(llvm::StringRef Header, bool IsAngled)<br>
>>>>> const;<br>
>>>>> -<br>
>>>>> -private:<br>
>>>>> -  struct Include {<br>
>>>>> -    Include(StringRef Name, tooling::Range R) : Name(Name), R(R) {}<br>
>>>>> -<br>
>>>>> -    // An include header quoted with either <> or "".<br>
>>>>> -    std::string Name;<br>
>>>>> -    // The range of the whole line of include directive including any<br>
>>>>> eading<br>
>>>>> -    // whitespaces and trailing comment.<br>
>>>>> -    tooling::Range R;<br>
>>>>> -  };<br>
>>>>> -<br>
>>>>> -  void addExistingInclude(Include IncludeToAdd, unsigned<br>
>>>>> NextLineOffset);<br>
>>>>> -<br>
>>>>> -  std::string FileName;<br>
>>>>> -  std::string Code;<br>
>>>>> -<br>
>>>>> -  // Map from include name (quotation trimmed) to a list of existing<br>
>>>>> includes<br>
>>>>> -  // (in case there are more than one) with the name in the current<br>
>>>>> file. <x><br>
>>>>> -  // and "x" will be treated as the same header when deleting<br>
>>>>> #includes.<br>
>>>>> -  llvm::StringMap<llvm::SmallVec<wbr>tor<Include, 1>> ExistingIncludes;<br>
>>>>> -<br>
>>>>> -  /// Map from priorities of #include categories to all #includes in<br>
>>>>> the same<br>
>>>>> -  /// category. This is used to find #includes of the same category<br>
>>>>> when<br>
>>>>> -  /// inserting new #includes. #includes in the same categories are<br>
>>>>> sorted in<br>
>>>>> -  /// in the order they appear in the source file.<br>
>>>>> -  /// See comment for "FormatStyle::IncludeCategorie<wbr>s" for details<br>
>>>>> about include<br>
>>>>> -  /// priorities.<br>
>>>>> -  std::unordered_map<int, llvm::SmallVector<const Include *, 8>><br>
>>>>> -      IncludesByPriority;<br>
>>>>> -<br>
>>>>> -  int FirstIncludeOffset;<br>
>>>>> -  // All new headers should be inserted after this offset (e.g. after<br>
>>>>> header<br>
>>>>> -  // guards, file comment).<br>
>>>>> -  unsigned MinInsertOffset;<br>
>>>>> -  // Max insertion offset in the original code. For example, we want<br>
>>>>> to avoid<br>
>>>>> -  // inserting new #includes into the actual code section (e.g. after<br>
>>>>> a<br>
>>>>> -  // declaration).<br>
>>>>> -  unsigned MaxInsertOffset;<br>
>>>>> -  IncludeCategoryManager Categories;<br>
>>>>> -  // Record the offset of the end of the last include in each<br>
>>>>> category.<br>
>>>>> -  std::unordered_map<int, int> CategoryEndOffsets;<br>
>>>>> -<br>
>>>>> -  // All possible priorities.<br>
>>>>> -  std::set<int> Priorities;<br>
>>>>> -<br>
>>>>> -  // Matches a whole #include directive.<br>
>>>>> -  llvm::Regex IncludeRegex;<br>
>>>>> -};<br>
>>>>> -<br>
>>>>> -<br>
>>>>> -} // namespace tooling<br>
>>>>> -} // namespace clang<br>
>>>>> -<br>
>>>>> -#endif // LLVM_CLANG_TOOLING_CORE_HEADER<wbr>INCLUDES_H<br>
>>>>> <br>
>>>>> Removed: cfe/trunk/include/clang/Toolin<wbr>g/Core/IncludeStyle.h<br>
>>>>> URL:<br>
>>>>> <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Tooling/Core/IncludeStyle.h?rev=333873&view=auto" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-pr<wbr>oject/cfe/trunk/include/clang/<wbr>Tooling/Core/IncludeStyle.h?<wbr>rev=333873&view=auto</a><br>
>>>>> <br>
>>>>> ==============================<wbr>==============================<wbr>==================<br>
>>>>> --- cfe/trunk/include/clang/Toolin<wbr>g/Core/IncludeStyle.h (original)<br>
>>>>> +++ cfe/trunk/include/clang/Toolin<wbr>g/Core/IncludeStyle.h (removed)<br>
>>>>> @@ -1,133 +0,0 @@<br>
>>>>> -//===--- IncludeStyle.h - Style of C++ #include directives -------*-<br>
>>>>> C++-*-===//<br>
>>>>> -//<br>
>>>>> -//                     The LLVM Compiler Infrastructure<br>
>>>>> -//<br>
>>>>> -// This file is distributed under the University of Illinois Open<br>
>>>>> Source<br>
>>>>> -// License. See LICENSE.TXT for details.<br>
>>>>> -//<br>
>>>>> <br>
>>>>> -//===------------------------<wbr>------------------------------<wbr>----------------===//<br>
>>>>> -<br>
>>>>> -#ifndef LLVM_CLANG_TOOLING_CORE_INCLUD<wbr>ESTYLE_H<br>
>>>>> -#define LLVM_CLANG_TOOLING_CORE_INCLUD<wbr>ESTYLE_H<br>
>>>>> -<br>
>>>>> -#include "llvm/Support/YAMLTraits.h"<br>
>>>>> -#include <string><br>
>>>>> -#include <vector><br>
>>>>> -<br>
>>>>> -namespace clang {<br>
>>>>> -namespace tooling {<br>
>>>>> -<br>
>>>>> -/// Style for sorting and grouping C++ #include directives.<br>
>>>>> -struct IncludeStyle {<br>
>>>>> -  /// Styles for sorting multiple ``#include`` blocks.<br>
>>>>> -  enum IncludeBlocksStyle {<br>
>>>>> -    /// Sort each ``#include`` block separately.<br>
>>>>> -    /// \code<br>
>>>>> -    ///    #include "b.h"               into      #include "b.h"<br>
>>>>> -    ///<br>
>>>>> -    ///    #include <lib/main.h>                  #include "a.h"<br>
>>>>> -    ///    #include "a.h"                         #include<br>
>>>>> <lib/main.h><br>
>>>>> -    /// \endcode<br>
>>>>> -    IBS_Preserve,<br>
>>>>> -    /// Merge multiple ``#include`` blocks together and sort as one.<br>
>>>>> -    /// \code<br>
>>>>> -    ///    #include "b.h"               into      #include "a.h"<br>
>>>>> -    ///                                           #include "b.h"<br>
>>>>> -    ///    #include <lib/main.h>                  #include<br>
>>>>> <lib/main.h><br>
>>>>> -    ///    #include "a.h"<br>
>>>>> -    /// \endcode<br>
>>>>> -    IBS_Merge,<br>
>>>>> -    /// Merge multiple ``#include`` blocks together and sort as one.<br>
>>>>> -    /// Then split into groups based on category priority. See<br>
>>>>> -    /// ``IncludeCategories``.<br>
>>>>> -    /// \code<br>
>>>>> -    ///    #include "b.h"               into      #include "a.h"<br>
>>>>> -    ///                                           #include "b.h"<br>
>>>>> -    ///    #include <lib/main.h><br>
>>>>> -    ///    #include "a.h"                         #include<br>
>>>>> <lib/main.h><br>
>>>>> -    /// \endcode<br>
>>>>> -    IBS_Regroup,<br>
>>>>> -  };<br>
>>>>> -<br>
>>>>> -  /// Dependent on the value, multiple ``#include`` blocks can be<br>
>>>>> sorted<br>
>>>>> -  /// as one and divided based on category.<br>
>>>>> -  IncludeBlocksStyle IncludeBlocks;<br>
>>>>> -<br>
>>>>> -  /// See documentation of ``IncludeCategories``.<br>
>>>>> -  struct IncludeCategory {<br>
>>>>> -    /// The regular expression that this category matches.<br>
>>>>> -    std::string Regex;<br>
>>>>> -    /// The priority to assign to this category.<br>
>>>>> -    int Priority;<br>
>>>>> -    bool operator==(const IncludeCategory &Other) const {<br>
>>>>> -      return Regex == Other.Regex && Priority == Other.Priority;<br>
>>>>> -    }<br>
>>>>> -  };<br>
>>>>> -<br>
>>>>> -  /// Regular expressions denoting the different ``#include``<br>
>>>>> categories<br>
>>>>> -  /// used for ordering ``#includes``.<br>
>>>>> -  ///<br>
>>>>> -  /// These regular expressions are matched against the filename of an<br>
>>>>> include<br>
>>>>> -  /// (including the <> or "") in order. The value belonging to the<br>
>>>>> first<br>
>>>>> -  /// matching regular expression is assigned and ``#includes`` are<br>
>>>>> sorted first<br>
>>>>> -  /// according to increasing category number and then alphabetically<br>
>>>>> within<br>
>>>>> -  /// each category.<br>
>>>>> -  ///<br>
>>>>> -  /// If none of the regular expressions match, INT_MAX is assigned as<br>
>>>>> -  /// category. The main header for a source file automatically gets<br>
>>>>> category 0.<br>
>>>>> -  /// so that it is generally kept at the beginning of the<br>
>>>>> ``#includes``<br>
>>>>> -  /// (<a href="http://llvm.org/docs/CodingStandards.html#include-style" rel="noreferrer" target="_blank">http://llvm.org/docs/CodingSt<wbr>andards.html#include-style</a>).<br>
>>>>> However, you<br>
>>>>> -  /// can also assign negative priorities if you have certain headers<br>
>>>>> that<br>
>>>>> -  /// always need to be first.<br>
>>>>> -  ///<br>
>>>>> -  /// To configure this in the .clang-format file, use:<br>
>>>>> -  /// \code{.yaml}<br>
>>>>> -  ///   IncludeCategories:<br>
>>>>> -  ///     - Regex:           '^"(llvm|llvm-c|clang|clang-<wbr>c)/'<br>
>>>>> -  ///       Priority:        2<br>
>>>>> -  ///     - Regex:           '^(<|"(gtest|gmock|isl|json)/<wbr>)'<br>
>>>>> -  ///       Priority:        3<br>
>>>>> -  ///     - Regex:           '.*'<br>
>>>>> -  ///       Priority:        1<br>
>>>>> -  /// \endcode<br>
>>>>> -  std::vector<IncludeCategory> IncludeCategories;<br>
>>>>> -<br>
>>>>> -  /// Specify a regular expression of suffixes that are allowed in the<br>
>>>>> -  /// file-to-main-include mapping.<br>
>>>>> -  ///<br>
>>>>> -  /// When guessing whether a #include is the "main" include (to<br>
>>>>> assign<br>
>>>>> -  /// category 0, see above), use this regex of allowed suffixes to<br>
>>>>> the header<br>
>>>>> -  /// stem. A partial match is done, so that:<br>
>>>>> -  /// - "" means "arbitrary suffix"<br>
>>>>> -  /// - "$" means "no suffix"<br>
>>>>> -  ///<br>
>>>>> -  /// For example, if configured to "(_test)?$", then a header a.h<br>
>>>>> would be seen<br>
>>>>> -  /// as the "main" include in both a.cc and a_test.cc.<br>
>>>>> -  std::string IncludeIsMainRegex;<br>
>>>>> -};<br>
>>>>> -<br>
>>>>> -} // namespace tooling<br>
>>>>> -} // namespace clang<br>
>>>>> -<br>
>>>>> <br>
>>>>> -LLVM_YAML_IS_SEQUENCE_VECTOR(<wbr>clang::tooling::IncludeStyle::<wbr>IncludeCategory)<br>
>>>>> -<br>
>>>>> -namespace llvm {<br>
>>>>> -namespace yaml {<br>
>>>>> -<br>
>>>>> -template <><br>
>>>>> -struct MappingTraits<clang::tooling::<wbr>IncludeStyle::IncludeCategory> {<br>
>>>>> -  static void mapping(IO &IO,<br>
>>>>> -                      clang::tooling::IncludeStyle::<wbr>IncludeCategory<br>
>>>>> &Category);<br>
>>>>> -};<br>
>>>>> -<br>
>>>>> -template <><br>
>>>>> -struct ScalarEnumerationTraits<<br>
>>>>> -    clang::tooling::IncludeStyle::<wbr>IncludeBlocksStyle> {<br>
>>>>> -  static void<br>
>>>>> -  enumeration(IO &IO, clang::tooling::IncludeStyle::<wbr>IncludeBlocksStyle<br>
>>>>> &Value);<br>
>>>>> -};<br>
>>>>> -<br>
>>>>> -} // namespace yaml<br>
>>>>> -} // namespace llvm<br>
>>>>> -<br>
>>>>> -#endif // LLVM_CLANG_TOOLING_CORE_INCLUD<wbr>ESTYLE_H<br>
>>>>> <br>
>>>>> Copied: cfe/trunk/include/clang/Toolin<wbr>g/Inclusions/HeaderIncludes.h<br>
>>>>> (from r333865, cfe/trunk/include/clang/Toolin<wbr>g/Core/HeaderIncludes.h)<br>
>>>>> URL:<br>
>>>>> <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Tooling/Inclusions/HeaderIncludes.h?p2=cfe/trunk/include/clang/Tooling/Inclusions/HeaderIncludes.h&p1=cfe/trunk/include/clang/Tooling/Core/HeaderIncludes.h&r1=333865&r2=333874&rev=333874&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-pr<wbr>oject/cfe/trunk/include/clang/<wbr>Tooling/Inclusions/HeaderInclu<wbr>des.h?p2=cfe/trunk/include/<wbr>clang/Tooling/Inclusions/<wbr>HeaderIncludes.h&p1=cfe/trunk/<wbr>include/clang/Tooling/Core/<wbr>HeaderIncludes.h&r1=333865&r2=<wbr>333874&rev=333874&view=diff</a><br>
>>>>> <br>
>>>>> ==============================<wbr>==============================<wbr>==================<br>
>>>>> --- cfe/trunk/include/clang/Toolin<wbr>g/Core/HeaderIncludes.h (original)<br>
>>>>> +++ cfe/trunk/include/clang/Toolin<wbr>g/Inclusions/HeaderIncludes.h Mon Jun<br>
>>>>> 4 02:04:12 2018<br>
>>>>> @@ -7,12 +7,12 @@<br>
>>>>> //<br>
>>>>> <br>
>>>>> //===-------------------------<wbr>------------------------------<wbr>---------------===//<br>
>>>>> <br>
>>>>> -#ifndef LLVM_CLANG_TOOLING_CORE_HEADER<wbr>INCLUDES_H<br>
>>>>> -#define LLVM_CLANG_TOOLING_CORE_HEADER<wbr>INCLUDES_H<br>
>>>>> +#ifndef LLVM_CLANG_TOOLING_INCLUSIONS_<wbr>HEADERINCLUDES_H<br>
>>>>> +#define LLVM_CLANG_TOOLING_INCLUSIONS_<wbr>HEADERINCLUDES_H<br>
>>>>> <br>
>>>>> #include "clang/Basic/SourceManager.h"<br>
>>>>> #include "clang/Tooling/Core/Replacemen<wbr>t.h"<br>
>>>>> -#include "clang/Tooling/Core/IncludeSty<wbr>le.h"<br>
>>>>> +#include "clang/Tooling/Inclusions/Incl<wbr>udeStyle.h"<br>
>>>>> #include "llvm/Support/Path.h"<br>
>>>>> #include "llvm/Support/Regex.h"<br>
>>>>> #include <unordered_map><br>
>>>>> @@ -134,4 +134,4 @@ private:<br>
>>>>> } // namespace tooling<br>
>>>>> } // namespace clang<br>
>>>>> <br>
>>>>> -#endif // LLVM_CLANG_TOOLING_CORE_HEADER<wbr>INCLUDES_H<br>
>>>>> +#endif // LLVM_CLANG_TOOLING_INCLUSIONS_<wbr>HEADERINCLUDES_H<br>
>>>>> <br>
>>>>> Copied: cfe/trunk/include/clang/Toolin<wbr>g/Inclusions/IncludeStyle.h (from<br>
>>>>> r333865, cfe/trunk/include/clang/Toolin<wbr>g/Core/IncludeStyle.h)<br>
>>>>> URL:<br>
>>>>> <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Tooling/Inclusions/IncludeStyle.h?p2=cfe/trunk/include/clang/Tooling/Inclusions/IncludeStyle.h&p1=cfe/trunk/include/clang/Tooling/Core/IncludeStyle.h&r1=333865&r2=333874&rev=333874&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-pr<wbr>oject/cfe/trunk/include/clang/<wbr>Tooling/Inclusions/IncludeStyl<wbr>e.h?p2=cfe/trunk/include/<wbr>clang/Tooling/Inclusions/<wbr>IncludeStyle.h&p1=cfe/trunk/<wbr>include/clang/Tooling/Core/<wbr>IncludeStyle.h&r1=333865&r2=<wbr>333874&rev=333874&view=diff</a><br>
>>>>> <br>
>>>>> ==============================<wbr>==============================<wbr>==================<br>
>>>>> --- cfe/trunk/include/clang/Toolin<wbr>g/Core/IncludeStyle.h (original)<br>
>>>>> +++ cfe/trunk/include/clang/Toolin<wbr>g/Inclusions/IncludeStyle.h Mon Jun<br>
>>>>> 4 02:04:12 2018<br>
>>>>> @@ -7,8 +7,8 @@<br>
>>>>> //<br>
>>>>> <br>
>>>>> //===-------------------------<wbr>------------------------------<wbr>---------------===//<br>
>>>>> <br>
>>>>> -#ifndef LLVM_CLANG_TOOLING_CORE_INCLUD<wbr>ESTYLE_H<br>
>>>>> -#define LLVM_CLANG_TOOLING_CORE_INCLUD<wbr>ESTYLE_H<br>
>>>>> +#ifndef LLVM_CLANG_TOOLING_INCLUSIONS_<wbr>INCLUDESTYLE_H<br>
>>>>> +#define LLVM_CLANG_TOOLING_INCLUSIONS_<wbr>INCLUDESTYLE_H<br>
>>>>> <br>
>>>>> #include "llvm/Support/YAMLTraits.h"<br>
>>>>> #include <string><br>
>>>>> @@ -130,4 +130,4 @@ struct ScalarEnumerationTraits<<br>
>>>>> } // namespace yaml<br>
>>>>> } // namespace llvm<br>
>>>>> <br>
>>>>> -#endif // LLVM_CLANG_TOOLING_CORE_INCLUD<wbr>ESTYLE_H<br>
>>>>> +#endif // LLVM_CLANG_TOOLING_INCLUSIONS_<wbr>INCLUDESTYLE_H<br>
>>>>> <br>
>>>>> Modified: cfe/trunk/include/clang/module<wbr>.modulemap<br>
>>>>> URL:<br>
>>>>> <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/module.modulemap?rev=333874&r1=333873&r2=333874&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-pr<wbr>oject/cfe/trunk/include/clang/<wbr>module.modulemap?rev=333874&<wbr>r1=333873&r2=333874&view=diff</a><br>
>>>>> <br>
>>>>> ==============================<wbr>==============================<wbr>==================<br>
>>>>> --- cfe/trunk/include/clang/module<wbr>.modulemap (original)<br>
>>>>> +++ cfe/trunk/include/clang/module<wbr>.modulemap Mon Jun  4 02:04:12 2018<br>
>>>>> @@ -154,3 +154,8 @@ module Clang_ToolingCore {<br>
>>>>>  requires cplusplus<br>
>>>>>  umbrella "Tooling/Core" module * { export * }<br>
>>>>> }<br>
>>>>> +<br>
>>>>> +module Clang_ToolingInclusions {<br>
>>>>> +  requires cplusplus<br>
>>>>> +  umbrella "Tooling/Inclusions" module * { export * }<br>
>>>>> +}<br>
>>>>> <br>
>>>>> Modified: cfe/trunk/lib/Format/CMakeList<wbr>s.txt<br>
>>>>> URL:<br>
>>>>> <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Format/CMakeLists.txt?rev=333874&r1=333873&r2=333874&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-pr<wbr>oject/cfe/trunk/lib/Format/CMa<wbr>keLists.txt?rev=333874&r1=3338<wbr>73&r2=333874&view=diff</a><br>
>>>>> <br>
>>>>> ==============================<wbr>==============================<wbr>==================<br>
>>>>> --- cfe/trunk/lib/Format/CMakeList<wbr>s.txt (original)<br>
>>>>> +++ cfe/trunk/lib/Format/CMakeList<wbr>s.txt Mon Jun  4 02:04:12 2018<br>
>>>>> @@ -20,4 +20,5 @@ add_clang_library(clangFormat<br>
>>>>>  clangBasic<br>
>>>>>  clangLex<br>
>>>>>  clangToolingCore<br>
>>>>> +  clangToolingInclusions<br>
>>>>>  )<br>
>>>>> <br>
>>>>> Modified: cfe/trunk/lib/Format/Format.cp<wbr>p<br>
>>>>> URL:<br>
>>>>> <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Format/Format.cpp?rev=333874&r1=333873&r2=333874&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-pr<wbr>oject/cfe/trunk/lib/Format/For<wbr>mat.cpp?rev=333874&r1=333873&<wbr>r2=333874&view=diff</a><br>
>>>>> <br>
>>>>> ==============================<wbr>==============================<wbr>==================<br>
>>>>> --- cfe/trunk/lib/Format/Format.cp<wbr>p (original)<br>
>>>>> +++ cfe/trunk/lib/Format/Format.cp<wbr>p Mon Jun  4 02:04:12 2018<br>
>>>>> @@ -31,7 +31,7 @@<br>
>>>>> #include "clang/Basic/SourceManager.h"<br>
>>>>> #include "clang/Basic/VirtualFileSystem<wbr>.h"<br>
>>>>> #include "clang/Lex/Lexer.h"<br>
>>>>> -#include "clang/Tooling/Core/HeaderIncl<wbr>udes.h"<br>
>>>>> +#include "clang/Tooling/Inclusions/Head<wbr>erIncludes.h"<br>
>>>>> #include "llvm/ADT/STLExtras.h"<br>
>>>>> #include "llvm/ADT/StringRef.h"<br>
>>>>> #include "llvm/Support/Allocator.h"<br>
>>>>> <br>
>>>>> Modified: cfe/trunk/lib/Tooling/CMakeLis<wbr>ts.txt<br>
>>>>> URL:<br>
>>>>> <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Tooling/CMakeLists.txt?rev=333874&r1=333873&r2=333874&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-pr<wbr>oject/cfe/trunk/lib/Tooling/CM<wbr>akeLists.txt?rev=333874&r1=333<wbr>873&r2=333874&view=diff</a><br>
>>>>> <br>
>>>>> ==============================<wbr>==============================<wbr>==================<br>
>>>>> --- cfe/trunk/lib/Tooling/CMakeLis<wbr>ts.txt (original)<br>
>>>>> +++ cfe/trunk/lib/Tooling/CMakeLis<wbr>ts.txt Mon Jun  4 02:04:12 2018<br>
>>>>> @@ -4,6 +4,7 @@ set(LLVM_LINK_COMPONENTS<br>
>>>>>  )<br>
>>>>> <br>
>>>>> add_subdirectory(Core)<br>
>>>>> +add_subdirectory(Inclusions)<br>
>>>>> add_subdirectory(Refactoring)<br>
>>>>> add_subdirectory(ASTDiff)<br>
>>>>> <br>
>>>>> <br>
>>>>> Modified: cfe/trunk/lib/Tooling/Core/CMa<wbr>keLists.txt<br>
>>>>> URL:<br>
>>>>> <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Tooling/Core/CMakeLists.txt?rev=333874&r1=333873&r2=333874&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-pr<wbr>oject/cfe/trunk/lib/Tooling/Co<wbr>re/CMakeLists.txt?rev=333874&<wbr>r1=333873&r2=333874&view=diff</a><br>
>>>>> <br>
>>>>> ==============================<wbr>==============================<wbr>==================<br>
>>>>> --- cfe/trunk/lib/Tooling/Core/CMa<wbr>keLists.txt (original)<br>
>>>>> +++ cfe/trunk/lib/Tooling/Core/CMa<wbr>keLists.txt Mon Jun  4 02:04:12 2018<br>
>>>>> @@ -2,8 +2,6 @@ set(LLVM_LINK_COMPONENTS support)<br>
>>>>> <br>
>>>>> add_clang_library(clangTooling<wbr>Core<br>
>>>>>  Diagnostic.cpp<br>
>>>>> -  HeaderIncludes.cpp<br>
>>>>> -  IncludeStyle.cpp<br>
>>>>>  Lookup.cpp<br>
>>>>>  Replacement.cpp<br>
>>>>> <br>
>>>>> <br>
>>>>> Removed: cfe/trunk/lib/Tooling/Core/Hea<wbr>derIncludes.cpp<br>
>>>>> URL:<br>
>>>>> <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Tooling/Core/HeaderIncludes.cpp?rev=333873&view=auto" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-pr<wbr>oject/cfe/trunk/lib/Tooling/Co<wbr>re/HeaderIncludes.cpp?rev=3338<wbr>73&view=auto</a><br>
>>>>> <br>
>>>>> ==============================<wbr>==============================<wbr>==================<br>
>>>>> --- cfe/trunk/lib/Tooling/Core/Hea<wbr>derIncludes.cpp (original)<br>
>>>>> +++ cfe/trunk/lib/Tooling/Core/Hea<wbr>derIncludes.cpp (removed)<br>
>>>>> @@ -1,330 +0,0 @@<br>
>>>>> -//===--- HeaderIncludes.cpp - Insert/Delete #includes --*- C++<br>
>>>>> -*----------===//<br>
>>>>> -//<br>
>>>>> -//                     The LLVM Compiler Infrastructure<br>
>>>>> -//<br>
>>>>> -// This file is distributed under the University of Illinois Open<br>
>>>>> Source<br>
>>>>> -// License. See LICENSE.TXT for details.<br>
>>>>> -//<br>
>>>>> <br>
>>>>> -//===------------------------<wbr>------------------------------<wbr>----------------===//<br>
>>>>> -<br>
>>>>> -#include "clang/Tooling/Core/HeaderIncl<wbr>udes.h"<br>
>>>>> -#include "clang/Basic/SourceManager.h"<br>
>>>>> -#include "clang/Lex/Lexer.h"<br>
>>>>> -<br>
>>>>> -namespace clang {<br>
>>>>> -namespace tooling {<br>
>>>>> -namespace {<br>
>>>>> -<br>
>>>>> -LangOptions createLangOpts() {<br>
>>>>> -  LangOptions LangOpts;<br>
>>>>> -  LangOpts.CPlusPlus = 1;<br>
>>>>> -  LangOpts.CPlusPlus11 = 1;<br>
>>>>> -  LangOpts.CPlusPlus14 = 1;<br>
>>>>> -  LangOpts.LineComment = 1;<br>
>>>>> -  LangOpts.CXXOperatorNames = 1;<br>
>>>>> -  LangOpts.Bool = 1;<br>
>>>>> -  LangOpts.ObjC1 = 1;<br>
>>>>> -  LangOpts.ObjC2 = 1;<br>
>>>>> -  LangOpts.MicrosoftExt = 1;    // To get kw___try, kw___finally.<br>
>>>>> -  LangOpts.DeclSpecKeyword = 1; // To get __declspec.<br>
>>>>> -  LangOpts.WChar = 1;           // To get wchar_t<br>
>>>>> -  return LangOpts;<br>
>>>>> -}<br>
>>>>> -<br>
>>>>> -// Returns the offset after skipping a sequence of tokens, matched by<br>
>>>>> \p<br>
>>>>> -// GetOffsetAfterSequence, from the start of the code.<br>
>>>>> -// \p GetOffsetAfterSequence should be a function that matches a<br>
>>>>> sequence of<br>
>>>>> -// tokens and returns an offset after the sequence.<br>
>>>>> -unsigned getOffsetAfterTokenSequence(<br>
>>>>> -    StringRef FileName, StringRef Code, const IncludeStyle &Style,<br>
>>>>> -    llvm::function_ref<unsigned(co<wbr>nst SourceManager &, Lexer &, Token<br>
>>>>> &)><br>
>>>>> -        GetOffsetAfterSequence) {<br>
>>>>> -  SourceManagerForFile VirtualSM(FileName, Code);<br>
>>>>> -  SourceManager &SM = VirtualSM.get();<br>
>>>>> -  Lexer Lex(SM.getMainFileID(), SM.getBuffer(SM.getMainFileID(<wbr>)), SM,<br>
>>>>> -            createLangOpts());<br>
>>>>> -  Token Tok;<br>
>>>>> -  // Get the first token.<br>
>>>>> -  Lex.LexFromRawLexer(Tok);<br>
>>>>> -  return GetOffsetAfterSequence(SM, Lex, Tok);<br>
>>>>> -}<br>
>>>>> -<br>
>>>>> -// Check if a sequence of tokens is like "#<Name> <raw_identifier>".<br>
>>>>> If it is,<br>
>>>>> -// \p Tok will be the token after this directive; otherwise, it can be<br>
>>>>> any token<br>
>>>>> -// after the given \p Tok (including \p Tok).<br>
>>>>> -bool checkAndConsumeDirectiveWithNa<wbr>me(Lexer &Lex, StringRef Name,<br>
>>>>> Token &Tok) {<br>
>>>>> -  bool Matched = Tok.is(tok::hash) && !Lex.LexFromRawLexer(Tok) &&<br>
>>>>> -                 Tok.is(tok::raw_identifier) &&<br>
>>>>> -                 Tok.getRawIdentifier() == Name &&<br>
>>>>> !Lex.LexFromRawLexer(Tok) &&<br>
>>>>> -                 Tok.is(tok::raw_identifier);<br>
>>>>> -  if (Matched)<br>
>>>>> -    Lex.LexFromRawLexer(Tok);<br>
>>>>> -  return Matched;<br>
>>>>> -}<br>
>>>>> -<br>
>>>>> -void skipComments(Lexer &Lex, Token &Tok) {<br>
>>>>> -  while (Tok.is(tok::comment))<br>
>>>>> -    if (Lex.LexFromRawLexer(Tok))<br>
>>>>> -      return;<br>
>>>>> -}<br>
>>>>> -<br>
>>>>> -// Returns the offset after header guard directives and any comments<br>
>>>>> -// before/after header guards. If no header guard presents in the<br>
>>>>> code, this<br>
>>>>> -// will returns the offset after skipping all comments from the start<br>
>>>>> of the<br>
>>>>> -// code.<br>
>>>>> -unsigned getOffsetAfterHeaderGuardsAndC<wbr>omments(StringRef FileName,<br>
>>>>> -                                               StringRef Code,<br>
>>>>> -                                               const IncludeStyle<br>
>>>>> &Style) {<br>
>>>>> -  return getOffsetAfterTokenSequence(<br>
>>>>> -      FileName, Code, Style,<br>
>>>>> -      [](const SourceManager &SM, Lexer &Lex, Token Tok) {<br>
>>>>> -        skipComments(Lex, Tok);<br>
>>>>> -        unsigned InitialOffset = SM.getFileOffset(Tok.getLocati<wbr>on());<br>
>>>>> -        if (checkAndConsumeDirectiveWithN<wbr>ame(Lex, "ifndef", Tok)) {<br>
>>>>> -          skipComments(Lex, Tok);<br>
>>>>> -          if (checkAndConsumeDirectiveWithN<wbr>ame(Lex, "define", Tok))<br>
>>>>> -            return SM.getFileOffset(Tok.getLocati<wbr>on());<br>
>>>>> -        }<br>
>>>>> -        return InitialOffset;<br>
>>>>> -      });<br>
>>>>> -}<br>
>>>>> -<br>
>>>>> -// Check if a sequence of tokens is like<br>
>>>>> -//    "#include ("header.h" | <header.h>)".<br>
>>>>> -// If it is, \p Tok will be the token after this directive; otherwise,<br>
>>>>> it can be<br>
>>>>> -// any token after the given \p Tok (including \p Tok).<br>
>>>>> -bool checkAndConsumeInclusiveDirect<wbr>ive(Lexer &Lex, Token &Tok) {<br>
>>>>> -  auto Matched = [&]() {<br>
>>>>> -    Lex.LexFromRawLexer(Tok);<br>
>>>>> -    return true;<br>
>>>>> -  };<br>
>>>>> -  if (Tok.is(tok::hash) && !Lex.LexFromRawLexer(Tok) &&<br>
>>>>> -      Tok.is(tok::raw_identifier) && Tok.getRawIdentifier() ==<br>
>>>>> "include") {<br>
>>>>> -    if (Lex.LexFromRawLexer(Tok))<br>
>>>>> -      return false;<br>
>>>>> -    if (Tok.is(tok::string_literal))<br>
>>>>> -      return Matched();<br>
>>>>> -    if (Tok.is(tok::less)) {<br>
>>>>> -      while (!Lex.LexFromRawLexer(Tok) && Tok.isNot(tok::greater)) {<br>
>>>>> -      }<br>
>>>>> -      if (Tok.is(tok::greater))<br>
>>>>> -        return Matched();<br>
>>>>> -    }<br>
>>>>> -  }<br>
>>>>> -  return false;<br>
>>>>> -}<br>
>>>>> -<br>
>>>>> -// Returns the offset of the last #include directive after which a new<br>
>>>>> -// #include can be inserted. This ignores #include's after the<br>
>>>>> #include block(s)<br>
>>>>> -// in the beginning of a file to avoid inserting headers into code<br>
>>>>> sections<br>
>>>>> -// where new #include's should not be added by default.<br>
>>>>> -// These code sections include:<br>
>>>>> -//      - raw string literals (containing #include).<br>
>>>>> -//      - #if blocks.<br>
>>>>> -//      - Special #include's among declarations (e.g. functions).<br>
>>>>> -//<br>
>>>>> -// If no #include after which a new #include can be inserted, this<br>
>>>>> returns the<br>
>>>>> -// offset after skipping all comments from the start of the code.<br>
>>>>> -// Inserting after an #include is not allowed if it comes after code<br>
>>>>> that is not<br>
>>>>> -// #include (e.g. pre-processing directive that is not #include,<br>
>>>>> declarations).<br>
>>>>> -unsigned getMaxHeaderInsertionOffset(St<wbr>ringRef FileName, StringRef<br>
>>>>> Code,<br>
>>>>> -                                     const IncludeStyle &Style) {<br>
>>>>> -  return getOffsetAfterTokenSequence(<br>
>>>>> -      FileName, Code, Style,<br>
>>>>> -      [](const SourceManager &SM, Lexer &Lex, Token Tok) {<br>
>>>>> -        skipComments(Lex, Tok);<br>
>>>>> -        unsigned MaxOffset = SM.getFileOffset(Tok.getLocati<wbr>on());<br>
>>>>> -        while (checkAndConsumeInclusiveDirec<wbr>tive(Lex, Tok))<br>
>>>>> -          MaxOffset = SM.getFileOffset(Tok.getLocati<wbr>on());<br>
>>>>> -        return MaxOffset;<br>
>>>>> -      });<br>
>>>>> -}<br>
>>>>> -<br>
>>>>> -inline StringRef trimInclude(StringRef IncludeName) {<br>
>>>>> -  return IncludeName.trim("\"<>");<br>
>>>>> -}<br>
>>>>> -<br>
>>>>> -const char IncludeRegexPattern[] =<br>
>>>>> -    R"(^[\t\ ]*#[\t\ ]*(import|include)[^"<]*(["<][<wbr>^">]*[">]))";<br>
>>>>> -<br>
>>>>> -} // anonymous namespace<br>
>>>>> -<br>
>>>>> -IncludeCategoryManager::Inclu<wbr>deCategoryManager(const IncludeStyle<br>
>>>>> &Style,<br>
>>>>> -                                               StringRef FileName)<br>
>>>>> -    : Style(Style), FileName(FileName) {<br>
>>>>> -  FileStem = llvm::sys::path::stem(FileName<wbr>);<br>
>>>>> -  for (const auto &Category : Style.IncludeCategories)<br>
>>>>> -    CategoryRegexs.emplace_back(Ca<wbr>tegory.Regex,<br>
>>>>> llvm::Regex::IgnoreCase);<br>
>>>>> -  IsMainFile = FileName.endswith(".c") || FileName.endswith(".cc") ||<br>
>>>>> -               FileName.endswith(".cpp") || FileName.endswith(".c++")<br>
>>>>> ||<br>
>>>>> -               FileName.endswith(".cxx") || FileName.endswith(".m") ||<br>
>>>>> -               FileName.endswith(".mm");<br>
>>>>> -}<br>
>>>>> -<br>
>>>>> -int IncludeCategoryManager::getInc<wbr>ludePriority(StringRef IncludeName,<br>
>>>>> -                                               bool CheckMainHeader)<br>
>>>>> const {<br>
>>>>> -  int Ret = INT_MAX;<br>
>>>>> -  for (unsigned i = 0, e = CategoryRegexs.size(); i != e; ++i)<br>
>>>>> -    if (CategoryRegexs[i].match(Inclu<wbr>deName)) {<br>
>>>>> -      Ret = Style.IncludeCategories[i].Pri<wbr>ority;<br>
>>>>> -      break;<br>
>>>>> -    }<br>
>>>>> -  if (CheckMainHeader && IsMainFile && Ret > 0 &&<br>
>>>>> isMainHeader(IncludeName))<br>
>>>>> -    Ret = 0;<br>
>>>>> -  return Ret;<br>
>>>>> -}<br>
>>>>> -<br>
>>>>> -bool IncludeCategoryManager::isMain<wbr>Header(StringRef IncludeName) const<br>
>>>>> {<br>
>>>>> -  if (!IncludeName.startswith("\"")<wbr>)<br>
>>>>> -    return false;<br>
>>>>> -  StringRef HeaderStem =<br>
>>>>> -      llvm::sys::path::stem(IncludeN<wbr>ame.drop_front(1).drop_back(1)<wbr>);<br>
>>>>> -  if (FileStem.startswith(HeaderSte<wbr>m) ||<br>
>>>>> -      FileStem.startswith_lower(Head<wbr>erStem)) {<br>
>>>>> -    llvm::Regex MainIncludeRegex((HeaderStem +<br>
>>>>> Style.IncludeIsMainRegex).str(<wbr>),<br>
>>>>> -                                 llvm::Regex::IgnoreCase);<br>
>>>>> -    if (MainIncludeRegex.match(FileSt<wbr>em))<br>
>>>>> -      return true;<br>
>>>>> -  }<br>
>>>>> -  return false;<br>
>>>>> -}<br>
>>>>> -<br>
>>>>> -HeaderIncludes::HeaderInclude<wbr>s(StringRef FileName, StringRef Code,<br>
>>>>> -                               const IncludeStyle &Style)<br>
>>>>> -    : FileName(FileName), Code(Code), FirstIncludeOffset(-1),<br>
>>>>> -      MinInsertOffset(<br>
>>>>> -          getOffsetAfterHeaderGuardsAndC<wbr>omments(FileName, Code,<br>
>>>>> Style)),<br>
>>>>> -      MaxInsertOffset(MinInsertOffse<wbr>t +<br>
>>>>> -                      getMaxHeaderInsertionOffset(<br>
>>>>> -                          FileName, Code.drop_front(MinInsertOffse<wbr>t),<br>
>>>>> Style)),<br>
>>>>> -      Categories(Style, FileName),<br>
>>>>> -      IncludeRegex(llvm::Regex(Inclu<wbr>deRegexPattern)) {<br>
>>>>> -  // Add 0 for main header and INT_MAX for headers that are not in any<br>
>>>>> -  // category.<br>
>>>>> -  Priorities = {0, INT_MAX};<br>
>>>>> -  for (const auto &Category : Style.IncludeCategories)<br>
>>>>> -    Priorities.insert(Category.Pri<wbr>ority);<br>
>>>>> -  SmallVector<StringRef, 32> Lines;<br>
>>>>> -  Code.drop_front(MinInsertOffse<wbr>t).split(Lines, "\n");<br>
>>>>> -<br>
>>>>> -  unsigned Offset = MinInsertOffset;<br>
>>>>> -  unsigned NextLineOffset;<br>
>>>>> -  SmallVector<StringRef, 4> Matches;<br>
>>>>> -  for (auto Line : Lines) {<br>
>>>>> -    NextLineOffset = std::min(Code.size(), Offset + Line.size() + 1);<br>
>>>>> -    if (IncludeRegex.match(Line, &Matches)) {<br>
>>>>> -      // If this is the last line without trailing newline, we need to<br>
>>>>> make<br>
>>>>> -      // sure we don't delete across the file boundary.<br>
>>>>> -      addExistingInclude(<br>
>>>>> -          Include(Matches[2],<br>
>>>>> -                  tooling::Range(<br>
>>>>> -                      Offset, std::min(Line.size() + 1, Code.size() -<br>
>>>>> Offset))),<br>
>>>>> -          NextLineOffset);<br>
>>>>> -    }<br>
>>>>> -    Offset = NextLineOffset;<br>
>>>>> -  }<br>
>>>>> -<br>
>>>>> -  // Populate CategoryEndOfssets:<br>
>>>>> -  // - Ensure that CategoryEndOffset[Highest] is always populated.<br>
>>>>> -  // - If CategoryEndOffset[Priority] isn't set, use the next higher<br>
>>>>> value<br>
>>>>> -  // that is set, up to CategoryEndOffset[Highest].<br>
>>>>> -  auto Highest = Priorities.begin();<br>
>>>>> -  if (CategoryEndOffsets.find(*High<wbr>est) == CategoryEndOffsets.end()) {<br>
>>>>> -    if (FirstIncludeOffset >= 0)<br>
>>>>> -      CategoryEndOffsets[*Highest] = FirstIncludeOffset;<br>
>>>>> -    else<br>
>>>>> -      CategoryEndOffsets[*Highest] = MinInsertOffset;<br>
>>>>> -  }<br>
>>>>> -  // By this point, CategoryEndOffset[Highest] is always set<br>
>>>>> appropriately:<br>
>>>>> -  //  - to an appropriate location before/after existing #includes, or<br>
>>>>> -  //  - to right after the header guard, or<br>
>>>>> -  //  - to the beginning of the file.<br>
>>>>> -  for (auto I = ++Priorities.begin(), E = Priorities.end(); I != E;<br>
>>>>> ++I)<br>
>>>>> -    if (CategoryEndOffsets.find(*I) == CategoryEndOffsets.end())<br>
>>>>> -      CategoryEndOffsets[*I] = CategoryEndOffsets[*std::prev(<wbr>I)];<br>
>>>>> -}<br>
>>>>> -<br>
>>>>> -// \p Offset: the start of the line following this include directive.<br>
>>>>> -void HeaderIncludes::addExistingInc<wbr>lude(Include IncludeToAdd,<br>
>>>>> -                                        unsigned NextLineOffset) {<br>
>>>>> -  auto Iter =<br>
>>>>> -<br>
>>>>> ExistingIncludes.try_emplace(t<wbr>rimInclude(IncludeToAdd.Name))<wbr>.first;<br>
>>>>> -  Iter->second.push_back(std::mo<wbr>ve(IncludeToAdd));<br>
>>>>> -  auto &CurInclude = Iter->second.back();<br>
>>>>> -  // The header name with quotes or angle brackets.<br>
>>>>> -  // Only record the offset of current #include if we can insert after<br>
>>>>> it.<br>
>>>>> -  if (CurInclude.R.getOffset() <= MaxInsertOffset) {<br>
>>>>> -    int Priority = Categories.getIncludePriority(<br>
>>>>> -        CurInclude.Name, /*CheckMainHeader=*/FirstInclu<wbr>deOffset < 0);<br>
>>>>> -    CategoryEndOffsets[Priority] = NextLineOffset;<br>
>>>>> -    IncludesByPriority[Priority].p<wbr>ush_back(&CurInclude);<br>
>>>>> -    if (FirstIncludeOffset < 0)<br>
>>>>> -      FirstIncludeOffset = CurInclude.R.getOffset();<br>
>>>>> -  }<br>
>>>>> -}<br>
>>>>> -<br>
>>>>> -llvm::Optional<tooling::Repla<wbr>cement><br>
>>>>> -HeaderIncludes::insert(llvm::<wbr>StringRef IncludeName, bool IsAngled)<br>
>>>>> const {<br>
>>>>> -  assert(IncludeName == trimInclude(IncludeName));<br>
>>>>> -  // If a <header> ("header") already exists in code, "header"<br>
>>>>> (<header>) with<br>
>>>>> -  // different quotation will still be inserted.<br>
>>>>> -  // FIXME: figure out if this is the best behavior.<br>
>>>>> -  auto It = ExistingIncludes.find(IncludeN<wbr>ame);<br>
>>>>> -  if (It != ExistingIncludes.end())<br>
>>>>> -    for (const auto &Inc : It->second)<br>
>>>>> -      if ((IsAngled && StringRef(Inc.Name).startswith<wbr>("<")) ||<br>
>>>>> -          (!IsAngled && StringRef(Inc.Name).startswith<wbr>("\"")))<br>
>>>>> -        return llvm::None;<br>
>>>>> -  std::string Quoted = IsAngled ? ("<" + IncludeName + ">").str()<br>
>>>>> -                                : ("\"" + IncludeName + "\"").str();<br>
>>>>> -  StringRef QuotedName = Quoted;<br>
>>>>> -  int Priority = Categories.getIncludePriority(<br>
>>>>> -      QuotedName, /*CheckMainHeader=*/FirstInclu<wbr>deOffset < 0);<br>
>>>>> -  auto CatOffset = CategoryEndOffsets.find(Priori<wbr>ty);<br>
>>>>> -  assert(CatOffset != CategoryEndOffsets.end());<br>
>>>>> -  unsigned InsertOffset = CatOffset->second; // Fall back offset<br>
>>>>> -  auto Iter = IncludesByPriority.find(Priori<wbr>ty);<br>
>>>>> -  if (Iter != IncludesByPriority.end()) {<br>
>>>>> -    for (const auto *Inc : Iter->second) {<br>
>>>>> -      if (QuotedName < Inc->Name) {<br>
>>>>> -        InsertOffset = Inc->R.getOffset();<br>
>>>>> -        break;<br>
>>>>> -      }<br>
>>>>> -    }<br>
>>>>> -  }<br>
>>>>> -  assert(InsertOffset <= Code.size());<br>
>>>>> -  std::string NewInclude = ("#include " + QuotedName + "\n").str();<br>
>>>>> -  // When inserting headers at end of the code, also append '\n' to<br>
>>>>> the code<br>
>>>>> -  // if it does not end with '\n'.<br>
>>>>> -  // FIXME: when inserting multiple #includes at the end of code, only<br>
>>>>> one<br>
>>>>> -  // newline should be added.<br>
>>>>> -  if (InsertOffset == Code.size() && (!Code.empty() && Code.back() !=<br>
>>>>> '\n'))<br>
>>>>> -    NewInclude = "\n" + NewInclude;<br>
>>>>> -  return tooling::Replacement(FileName, InsertOffset, 0, NewInclude);<br>
>>>>> -}<br>
>>>>> -<br>
>>>>> -tooling::Replacements HeaderIncludes::remove(llvm::S<wbr>tringRef<br>
>>>>> IncludeName,<br>
>>>>> -                                             bool IsAngled) const {<br>
>>>>> -  assert(IncludeName == trimInclude(IncludeName));<br>
>>>>> -  tooling::Replacements Result;<br>
>>>>> -  auto Iter = ExistingIncludes.find(IncludeN<wbr>ame);<br>
>>>>> -  if (Iter == ExistingIncludes.end())<br>
>>>>> -    return Result;<br>
>>>>> -  for (const auto &Inc : Iter->second) {<br>
>>>>> -    if ((IsAngled && StringRef(Inc.Name).startswith<wbr>("\"")) ||<br>
>>>>> -        (!IsAngled && StringRef(Inc.Name).startswith<wbr>("<")))<br>
>>>>> -      continue;<br>
>>>>> -    llvm::Error Err = Result.add(tooling::Replacemen<wbr>t(<br>
>>>>> -        FileName, Inc.R.getOffset(), Inc.R.getLength(), ""));<br>
>>>>> -    if (Err) {<br>
>>>>> -      auto ErrMsg = "Unexpected conflicts in #include deletions: " +<br>
>>>>> -                    llvm::toString(std::move(Err))<wbr>;<br>
>>>>> -      llvm_unreachable(ErrMsg.c_str(<wbr>));<br>
>>>>> -    }<br>
>>>>> -  }<br>
>>>>> -  return Result;<br>
>>>>> -}<br>
>>>>> -<br>
>>>>> -<br>
>>>>> -} // namespace tooling<br>
>>>>> -} // namespace clang<br>
>>>>> <br>
>>>>> Removed: cfe/trunk/lib/Tooling/Core/Inc<wbr>ludeStyle.cpp<br>
>>>>> URL:<br>
>>>>> <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Tooling/Core/IncludeStyle.cpp?rev=333873&view=auto" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-pr<wbr>oject/cfe/trunk/lib/Tooling/Co<wbr>re/IncludeStyle.cpp?rev=333873<wbr>&view=auto</a><br>
>>>>> <br>
>>>>> ==============================<wbr>==============================<wbr>==================<br>
>>>>> --- cfe/trunk/lib/Tooling/Core/Inc<wbr>ludeStyle.cpp (original)<br>
>>>>> +++ cfe/trunk/lib/Tooling/Core/Inc<wbr>ludeStyle.cpp (removed)<br>
>>>>> @@ -1,32 +0,0 @@<br>
>>>>> -//===--- IncludeStyle.cpp - Style of C++ #include directives -----*-<br>
>>>>> C++-*-===//<br>
>>>>> -//<br>
>>>>> -//                     The LLVM Compiler Infrastructure<br>
>>>>> -//<br>
>>>>> -// This file is distributed under the University of Illinois Open<br>
>>>>> Source<br>
>>>>> -// License. See LICENSE.TXT for details.<br>
>>>>> -//<br>
>>>>> <br>
>>>>> -//===------------------------<wbr>------------------------------<wbr>----------------===//<br>
>>>>> -<br>
>>>>> -#include "clang/Tooling/Core/IncludeSty<wbr>le.h"<br>
>>>>> -<br>
>>>>> -<br>
>>>>> -using clang::tooling::IncludeStyle;<br>
>>>>> -<br>
>>>>> -namespace llvm {<br>
>>>>> -namespace yaml {<br>
>>>>> -<br>
>>>>> -void MappingTraits<IncludeStyle::In<wbr>cludeCategory>::mapping(<br>
>>>>> -    IO &IO, IncludeStyle::IncludeCategory &Category) {<br>
>>>>> -  IO.mapOptional("Regex", Category.Regex);<br>
>>>>> -  IO.mapOptional("Priority", Category.Priority);<br>
>>>>> -}<br>
>>>>> -<br>
>>>>> -void<br>
>>>>> ScalarEnumerationTraits<Includ<wbr>eStyle::IncludeBlocksStyle>::e<wbr>numeration(<br>
>>>>> -    IO &IO, IncludeStyle::IncludeBlocksSty<wbr>le &Value) {<br>
>>>>> -  IO.enumCase(Value, "Preserve", IncludeStyle::IBS_Preserve);<br>
>>>>> -  IO.enumCase(Value, "Merge", IncludeStyle::IBS_Merge);<br>
>>>>> -  IO.enumCase(Value, "Regroup", IncludeStyle::IBS_Regroup);<br>
>>>>> -}<br>
>>>>> -<br>
>>>>> -} // namespace yaml<br>
>>>>> -} // namespace llvm<br>
>>>>> <br>
>>>>> Copied: cfe/trunk/lib/Tooling/Inclusio<wbr>ns/CMakeLists.txt (from r333865,<br>
>>>>> cfe/trunk/lib/Tooling/Core/CMa<wbr>keLists.txt)<br>
>>>>> URL:<br>
>>>>> <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Tooling/Inclusions/CMakeLists.txt?p2=cfe/trunk/lib/Tooling/Inclusions/CMakeLists.txt&p1=cfe/trunk/lib/Tooling/Core/CMakeLists.txt&r1=333865&r2=333874&rev=333874&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-pr<wbr>oject/cfe/trunk/lib/Tooling/In<wbr>clusions/CMakeLists.txt?p2=cfe<wbr>/trunk/lib/Tooling/Inclusions/<wbr>CMakeLists.txt&p1=cfe/trunk/<wbr>lib/Tooling/Core/CMakeLists.<wbr>txt&r1=333865&r2=333874&rev=<wbr>333874&view=diff</a><br>
>>>>> <br>
>>>>> ==============================<wbr>==============================<wbr>==================<br>
>>>>> --- cfe/trunk/lib/Tooling/Core/CMa<wbr>keLists.txt (original)<br>
>>>>> +++ cfe/trunk/lib/Tooling/Inclusio<wbr>ns/CMakeLists.txt Mon Jun  4 02:04:12<br>
>>>>> 2018<br>
>>>>> @@ -1,15 +1,12 @@<br>
>>>>> set(LLVM_LINK_COMPONENTS support)<br>
>>>>> <br>
>>>>> -add_clang_library(clangToolin<wbr>gCore<br>
>>>>> -  Diagnostic.cpp<br>
>>>>> +add_clang_library(clangToolin<wbr>gInclusions<br>
>>>>>  HeaderIncludes.cpp<br>
>>>>>  IncludeStyle.cpp<br>
>>>>> -  Lookup.cpp<br>
>>>>> -  Replacement.cpp<br>
>>>>> <br>
>>>>>  LINK_LIBS<br>
>>>>> -  clangAST<br>
>>>>>  clangBasic<br>
>>>>>  clangLex<br>
>>>>>  clangRewrite<br>
>>>>> +  clangToolingCore<br>
>>>>>  )<br>
>>>>> <br>
>>>>> Copied: cfe/trunk/lib/Tooling/Inclusio<wbr>ns/HeaderIncludes.cpp (from<br>
>>>>> r333865, cfe/trunk/lib/Tooling/Core/Hea<wbr>derIncludes.cpp)<br>
>>>>> URL:<br>
>>>>> <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Tooling/Inclusions/HeaderIncludes.cpp?p2=cfe/trunk/lib/Tooling/Inclusions/HeaderIncludes.cpp&p1=cfe/trunk/lib/Tooling/Core/HeaderIncludes.cpp&r1=333865&r2=333874&rev=333874&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-pr<wbr>oject/cfe/trunk/lib/Tooling/In<wbr>clusions/HeaderIncludes.cpp?p2<wbr>=cfe/trunk/lib/Tooling/Inclusi<wbr>ons/HeaderIncludes.cpp&p1=cfe/<wbr>trunk/lib/Tooling/Core/HeaderI<wbr>ncludes.cpp&r1=333865&r2=<wbr>333874&rev=333874&view=diff</a><br>
>>>>> <br>
>>>>> ==============================<wbr>==============================<wbr>==================<br>
>>>>> --- cfe/trunk/lib/Tooling/Core/Hea<wbr>derIncludes.cpp (original)<br>
>>>>> +++ cfe/trunk/lib/Tooling/Inclusio<wbr>ns/HeaderIncludes.cpp Mon Jun  4<br>
>>>>> 02:04:12 2018<br>
>>>>> @@ -7,7 +7,7 @@<br>
>>>>> //<br>
>>>>> <br>
>>>>> //===-------------------------<wbr>------------------------------<wbr>---------------===//<br>
>>>>> <br>
>>>>> -#include "clang/Tooling/Core/HeaderIncl<wbr>udes.h"<br>
>>>>> +#include "clang/Tooling/Inclusions/Head<wbr>erIncludes.h"<br>
>>>>> #include "clang/Basic/SourceManager.h"<br>
>>>>> #include "clang/Lex/Lexer.h"<br>
>>>>> <br>
>>>>> <br>
>>>>> Copied: cfe/trunk/lib/Tooling/Inclusio<wbr>ns/IncludeStyle.cpp (from<br>
>>>>> r333865, cfe/trunk/lib/Tooling/Core/Inc<wbr>ludeStyle.cpp)<br>
>>>>> URL:<br>
>>>>> <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Tooling/Inclusions/IncludeStyle.cpp?p2=cfe/trunk/lib/Tooling/Inclusions/IncludeStyle.cpp&p1=cfe/trunk/lib/Tooling/Core/IncludeStyle.cpp&r1=333865&r2=333874&rev=333874&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-pr<wbr>oject/cfe/trunk/lib/Tooling/In<wbr>clusions/IncludeStyle.cpp?p2=<wbr>cfe/trunk/lib/Tooling/Inclusio<wbr>ns/IncludeStyle.cpp&p1=cfe/<wbr>trunk/lib/Tooling/Core/Include<wbr>Style.cpp&r1=333865&r2=333874&<wbr>rev=333874&view=diff</a><br>
>>>>> <br>
>>>>> ==============================<wbr>==============================<wbr>==================<br>
>>>>> --- cfe/trunk/lib/Tooling/Core/Inc<wbr>ludeStyle.cpp (original)<br>
>>>>> +++ cfe/trunk/lib/Tooling/Inclusio<wbr>ns/IncludeStyle.cpp Mon Jun  4<br>
>>>>> 02:04:12 2018<br>
>>>>> @@ -7,8 +7,7 @@<br>
>>>>> //<br>
>>>>> <br>
>>>>> //===-------------------------<wbr>------------------------------<wbr>---------------===//<br>
>>>>> <br>
>>>>> -#include "clang/Tooling/Core/IncludeSty<wbr>le.h"<br>
>>>>> -<br>
>>>>> +#include "clang/Tooling/Inclusions/Incl<wbr>udeStyle.h"<br>
>>>>> <br>
>>>>> using clang::tooling::IncludeStyle;<br>
>>>>> <br>
>>>>> <br>
>>>>> Modified: cfe/trunk/unittests/Tooling/He<wbr>aderIncludesTest.cpp<br>
>>>>> URL:<br>
>>>>> <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/unittests/Tooling/HeaderIncludesTest.cpp?rev=333874&r1=333873&r2=333874&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-pr<wbr>oject/cfe/trunk/unittests/Tool<wbr>ing/HeaderIncludesTest.cpp?<wbr>rev=333874&r1=333873&r2=333874<wbr>&view=diff</a><br>
>>>>> <br>
>>>>> ==============================<wbr>==============================<wbr>==================<br>
>>>>> --- cfe/trunk/unittests/Tooling/He<wbr>aderIncludesTest.cpp (original)<br>
>>>>> +++ cfe/trunk/unittests/Tooling/He<wbr>aderIncludesTest.cpp Mon Jun  4<br>
>>>>> 02:04:12 2018<br>
>>>>> @@ -7,7 +7,7 @@<br>
>>>>> //<br>
>>>>> <br>
>>>>> //===-------------------------<wbr>------------------------------<wbr>---------------===//<br>
>>>>> <br>
>>>>> -#include "clang/Tooling/Core/HeaderIncl<wbr>udes.h"<br>
>>>>> +#include "clang/Tooling/Inclusions/Head<wbr>erIncludes.h"<br>
>>>>> #include "../Tooling/ReplacementTest.h"<br>
>>>>> #include "../Tooling/RewriterTestContex<wbr>t.h"<br>
>>>>> #include "clang/Format/Format.h"<br>
>>>>> <br>
>>>>> <br>
>>>>> ______________________________<wbr>_________________<br>
>>>>> cfe-commits mailing list<br>
>>>>> <a href="mailto:cfe-commits@lists.llvm.org" target="_blank">cfe-commits@lists.llvm.org</a><br>
>>>>> <a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/cfe-commits</a><br>
>>>> ______________________________<wbr>_________________<br>
>>>> cfe-commits mailing list<br>
>>>> <a href="mailto:cfe-commits@lists.llvm.org" target="_blank">cfe-commits@lists.llvm.org</a><br>
>>>> <a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/cfe-commits</a><br>
>>> <br>
>>> ______________________________<wbr>_________________<br>
>>> cfe-commits mailing list<br>
>>> <a href="mailto:cfe-commits@lists.llvm.org" target="_blank">cfe-commits@lists.llvm.org</a><br>
>>> <a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/cfe-commits</a><br>
>> <br>
>> <br>
<br>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br></div>