[clang] dbde7cc - Switch from int to unsigned int; NFC

Aaron Ballman via cfe-commits cfe-commits at lists.llvm.org
Thu Mar 9 06:29:11 PST 2023


Author: Aaron Ballman
Date: 2023-03-09T09:29:00-05:00
New Revision: dbde7cc17c3a5b6a35e5ec598ba7eaba6f75d90b

URL: https://github.com/llvm/llvm-project/commit/dbde7cc17c3a5b6a35e5ec598ba7eaba6f75d90b
DIFF: https://github.com/llvm/llvm-project/commit/dbde7cc17c3a5b6a35e5ec598ba7eaba6f75d90b.diff

LOG: Switch from int to unsigned int; NFC

This silences a GCC conversion diagnostic about assigning `1` to a
1-bit signed bit-field changing the value from `1` to `-1`.

Co-authored-by: Igor Kushnir <igorkuo at gmail.com>

Added: 
    

Modified: 
    clang/include/clang-c/Index.h

Removed: 
    


################################################################################
diff  --git a/clang/include/clang-c/Index.h b/clang/include/clang-c/Index.h
index 152f65c9028e..b986d2923590 100644
--- a/clang/include/clang-c/Index.h
+++ b/clang/include/clang-c/Index.h
@@ -362,11 +362,11 @@ typedef struct CXIndexOptions {
   /**
    * \see clang_createIndex()
    */
-  int ExcludeDeclarationsFromPCH : 1;
+  unsigned ExcludeDeclarationsFromPCH : 1;
   /**
    * \see clang_createIndex()
    */
-  int DisplayDiagnostics : 1;
+  unsigned DisplayDiagnostics : 1;
   /**
    * The path to a directory, in which to store temporary PCH files. If null or
    * empty, the default system temporary directory is used. These PCH files are


        


More information about the cfe-commits mailing list