[clang] 8c1f77a - [clang-format] Fix windows build.
    Manuel Klimek via cfe-commits 
    cfe-commits at lists.llvm.org
       
    Wed Feb 15 13:03:16 PST 2023
    
    
  
Author: Manuel Klimek
Date: 2023-02-15T20:59:43Z
New Revision: 8c1f77af7fd14d5a611246aa16b9693d3ebcee22
URL: https://github.com/llvm/llvm-project/commit/8c1f77af7fd14d5a611246aa16b9693d3ebcee22
DIFF: https://github.com/llvm/llvm-project/commit/8c1f77af7fd14d5a611246aa16b9693d3ebcee22.diff
LOG: [clang-format] Fix windows build.
MSVC needs a return after llvm_unreachable.
Added: 
    
Modified: 
    clang/lib/Format/FormatTokenSource.h
Removed: 
    
################################################################################
diff  --git a/clang/lib/Format/FormatTokenSource.h b/clang/lib/Format/FormatTokenSource.h
index 0be46287f6b74..d93efaf676087 100644
--- a/clang/lib/Format/FormatTokenSource.h
+++ b/clang/lib/Format/FormatTokenSource.h
@@ -18,6 +18,7 @@
 #include "FormatToken.h"
 #include "UnwrappedLineParser.h"
 #include "llvm/ADT/DenseMap.h"
+#include <cstddef>
 
 #define DEBUG_TYPE "format-token-source"
 
@@ -237,6 +238,7 @@ class ScopedMacroState : public FormatTokenSource {
 
   FormatToken *insertTokens(ArrayRef<FormatToken *> Tokens) override {
     llvm_unreachable("Cannot insert tokens while parsing a macro.");
+    return nullptr;
   }
 
 private:
        
    
    
More information about the cfe-commits
mailing list