<div dir="ltr">Hello Benjamin,<br><br>I look s like this commit broke build on one of our builders:<br><br><a href="http://lab.llvm.org:8011/builders/llvm-clang-x86_64-expensive-checks-win/builds/5327">http://lab.llvm.org:8011/builders/llvm-clang-x86_64-expensive-checks-win/builds/5327</a><br><br>. . .<br>FAILED: tools/clang/lib/Serialization/CMakeFiles/clangSerialization.dir/ASTReader.cpp.obj <br>C:\PROGRA~2\MICROS~1.0\VC\bin\amd64\cl.exe  /nologo /TP -DEXPENSIVE_CHECKS -DGTEST_HAS_RTTI=0 -DUNICODE -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_NONSTDC_NO_WARNINGS -D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS -D_GLIBCXX_DEBUG -D_GNU_SOURCE -D_HAS_EXCEPTIONS=0 -D_SCL_SECURE_NO_DEPRECATE -D_SCL_SECURE_NO_WARNINGS -D_UNICODE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Itools\clang\lib\Serialization -IC:\ps4-buildslave2\llvm-clang-x86_64-expensive-checks-win\llvm\tools\clang\lib\Serialization -IC:\ps4-buildslave2\llvm-clang-x86_64-expensive-checks-win\llvm\tools\clang\include -Itools\clang\include -Iinclude -IC:\ps4-buildslave2\llvm-clang-x86_64-expensive-checks-win\llvm\include /DWIN32 /D_WINDOWS   /WX /Zc:inline /Zc:strictStrings /Oi /Zc:rvalueCast /W4 -wd4141 -wd4146 -wd4180 -wd4244 -wd4258 -wd4267 -wd4291 -wd4345 -wd4351 -wd4355 -wd4456 -wd4457 -wd4458 -wd4459 -wd4503 -wd4624 -wd4722 -wd4800 -wd4100 -wd4127 -wd4512 -wd4505 -wd4610 -wd4510 -wd4702 -wd4245 -wd4706 -wd4310 -wd4701 -wd4703 -wd4389 -wd4611 -wd4805 -wd4204 -wd4577 -wd4091 -wd4592 -wd4319 -wd4324 -w14062 -we4238 /MDd /Zi /Ob0 /Od /RTC1    /EHs-c- /GR- /showIncludes /Fotools\clang\lib\Serialization\CMakeFiles\clangSerialization.dir\ASTReader.cpp.obj /Fdtools\clang\lib\Serialization\CMakeFiles\clangSerialization.dir\clangSerialization.pdb /FS -c C:\ps4-buildslave2\llvm-clang-x86_64-expensive-checks-win\llvm\tools\clang\lib\Serialization\ASTReader.cpp<br>C:\ps4-buildslave2\llvm-clang-x86_64-expensive-checks-win\llvm\tools\clang\lib\Serialization\ASTReader.cpp(5731): error C2220: warning treated as error - no 'object' file generated<br>C:\ps4-buildslave2\llvm-clang-x86_64-expensive-checks-win\llvm\tools\clang\lib\Serialization\ASTReader.cpp(5731): warning C4709: comma operator within array index expression<br><br>Please have a look?<br><br>Thanks<br><br>Galina<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Oct 8, 2017 at 1:53 PM, Benjamin Kramer via cfe-commits <span dir="ltr"><<a href="mailto:cfe-commits@lists.llvm.org" target="_blank">cfe-commits@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: d0k<br>
Date: Sun Oct  8 13:53:36 2017<br>
New Revision: 315194<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=315194&view=rev" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project?rev=315194&view=rev</a><br>
Log:<br>
Make SourceLocation, QualType and friends have constexpr constructors.<br>
<br>
No functionality change intended.<br>
<br>
Modified:<br>
    cfe/trunk/include/clang/AST/<wbr>CharUnits.h<br>
    cfe/trunk/include/clang/AST/<wbr>Type.h<br>
    cfe/trunk/include/clang/Basic/<wbr>SourceLocation.h<br>
<br>
Modified: cfe/trunk/include/clang/AST/<wbr>CharUnits.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/CharUnits.h?rev=315194&r1=315193&r2=315194&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project/cfe/trunk/include/<wbr>clang/AST/CharUnits.h?rev=<wbr>315194&r1=315193&r2=315194&<wbr>view=diff</a><br>
==============================<wbr>==============================<wbr>==================<br>
--- cfe/trunk/include/clang/AST/<wbr>CharUnits.h (original)<br>
+++ cfe/trunk/include/clang/AST/<wbr>CharUnits.h Sun Oct  8 13:53:36 2017<br>
@@ -40,14 +40,14 @@ namespace clang {<br>
       typedef int64_t QuantityType;<br>
<br>
     private:<br>
-      QuantityType Quantity;<br>
+      QuantityType Quantity = 0;<br>
<br>
       explicit CharUnits(QuantityType C) : Quantity(C) {}<br>
<br>
     public:<br>
<br>
       /// CharUnits - A default constructor.<br>
-      CharUnits() : Quantity(0) {}<br>
+      CharUnits() = default;<br>
<br>
       /// Zero - Construct a CharUnits quantity of zero.<br>
       static CharUnits Zero() {<br>
<br>
Modified: cfe/trunk/include/clang/AST/<wbr>Type.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/Type.h?rev=315194&r1=315193&r2=315194&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project/cfe/trunk/include/<wbr>clang/AST/Type.h?rev=315194&<wbr>r1=315193&r2=315194&view=diff</a><br>
==============================<wbr>==============================<wbr>==================<br>
--- cfe/trunk/include/clang/AST/<wbr>Type.h (original)<br>
+++ cfe/trunk/include/clang/AST/<wbr>Type.h Sun Oct  8 13:53:36 2017<br>
@@ -162,8 +162,6 @@ public:<br>
     FastMask = (1 << FastWidth) - 1<br>
   };<br>
<br>
-  Qualifiers() : Mask(0) {}<br>
-<br>
   /// Returns the common set of qualifiers while removing them from<br>
   /// the given sets.<br>
   static Qualifiers removeCommonQualifiers(<wbr>Qualifiers &L, Qualifiers &R) {<br>
@@ -539,7 +537,7 @@ private:<br>
<br>
   // bits:     |0 1 2|3|4 .. 5|6  ..  8|9   ...   31|<br>
   //           |C R V|U|GCAttr|Lifetime|<wbr>AddressSpace|<br>
-  uint32_t Mask;<br>
+  uint32_t Mask = 0;<br>
<br>
   static const uint32_t UMask = 0x8;<br>
   static const uint32_t UShift = 3;<br>
@@ -634,7 +632,7 @@ class QualType {<br>
<br>
   friend class QualifierCollector;<br>
 public:<br>
-  QualType() {}<br>
+  QualType() = default;<br>
<br>
   QualType(const Type *Ptr, unsigned Quals)<br>
     : Value(Ptr, Quals) {}<br>
<br>
Modified: cfe/trunk/include/clang/Basic/<wbr>SourceLocation.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/SourceLocation.h?rev=315194&r1=315193&r2=315194&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project/cfe/trunk/include/<wbr>clang/Basic/SourceLocation.h?<wbr>rev=315194&r1=315193&r2=<wbr>315194&view=diff</a><br>
==============================<wbr>==============================<wbr>==================<br>
--- cfe/trunk/include/clang/Basic/<wbr>SourceLocation.h (original)<br>
+++ cfe/trunk/include/clang/Basic/<wbr>SourceLocation.h Sun Oct  8 13:53:36 2017<br>
@@ -39,10 +39,9 @@ class SourceManager;<br>
 class FileID {<br>
   /// \brief A mostly-opaque identifier, where 0 is "invalid", >0 is<br>
   /// this module, and <-1 is something loaded from another module.<br>
-  int ID;<br>
-public:<br>
-  FileID() : ID(0) {}<br>
+  int ID = 0;<br>
<br>
+public:<br>
   bool isValid() const { return ID != 0; }<br>
   bool isInvalid() const { return ID == 0; }<br>
<br>
@@ -86,17 +85,15 @@ private:<br>
 ///<br>
 /// It is important that this type remains small. It is currently 32 bits wide.<br>
 class SourceLocation {<br>
-  unsigned ID;<br>
+  unsigned ID = 0;<br>
   friend class SourceManager;<br>
   friend class ASTReader;<br>
   friend class ASTWriter;<br>
   enum : unsigned {<br>
     MacroIDBit = 1U << 31<br>
   };<br>
-public:<br>
-<br>
-  SourceLocation() : ID(0) {}<br>
<br>
+public:<br>
   bool isFileID() const  { return (ID & MacroIDBit) == 0; }<br>
   bool isMacroID() const { return (ID & MacroIDBit) != 0; }<br>
<br>
@@ -198,8 +195,9 @@ inline bool operator<(const SourceLocati<br>
 class SourceRange {<br>
   SourceLocation B;<br>
   SourceLocation E;<br>
+<br>
 public:<br>
-  SourceRange(): B(SourceLocation()), E(SourceLocation()) {}<br>
+  SourceRange() = default;<br>
   SourceRange(SourceLocation loc) : B(loc), E(loc) {}<br>
   SourceRange(SourceLocation begin, SourceLocation end) : B(begin), E(end) {}<br>
<br>
@@ -230,9 +228,10 @@ public:<br>
 /// range.<br>
 class CharSourceRange {<br>
   SourceRange Range;<br>
-  bool IsTokenRange;<br>
+  bool IsTokenRange = false;<br>
+<br>
 public:<br>
-  CharSourceRange() : IsTokenRange(false) {}<br>
+  CharSourceRange() = default;<br>
   CharSourceRange(SourceRange R, bool ITR) : Range(R), IsTokenRange(ITR) {}<br>
<br>
   static CharSourceRange getTokenRange(SourceRange R) {<br>
@@ -330,10 +329,11 @@ class FileEntry;<br>
 ///<br>
 /// This is useful for argument passing to functions that expect both objects.<br>
 class FullSourceLoc : public SourceLocation {<br>
-  const SourceManager *SrcMgr;<br>
+  const SourceManager *SrcMgr = nullptr;<br>
+<br>
 public:<br>
   /// \brief Creates a FullSourceLoc where isValid() returns \c false.<br>
-  explicit FullSourceLoc() : SrcMgr(nullptr) {}<br>
+  FullSourceLoc() = default;<br>
<br>
   explicit FullSourceLoc(SourceLocation Loc, const SourceManager &SM)<br>
     : SourceLocation(Loc), SrcMgr(&SM) {}<br>
<br>
<br>
______________________________<wbr>_________________<br>
cfe-commits mailing list<br>
<a href="mailto:cfe-commits@lists.llvm.org">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>
</blockquote></div><br></div>