[clang] 3823395 - [libclang] Modernize Location (NFC)

Kazu Hirata via cfe-commits cfe-commits at lists.llvm.org
Sun Aug 27 16:14:09 PDT 2023


Author: Kazu Hirata
Date: 2023-08-27T16:13:55-07:00
New Revision: 3823395c9d715a1ed993eb13fc2bec97372f5655

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

LOG: [libclang] Modernize Location (NFC)

Added: 
    

Modified: 
    clang/tools/libclang/CXLoadedDiagnostic.h

Removed: 
    


################################################################################
diff  --git a/clang/tools/libclang/CXLoadedDiagnostic.h b/clang/tools/libclang/CXLoadedDiagnostic.h
index 93995d7bb798c7..5ad9e1c32a92fa 100644
--- a/clang/tools/libclang/CXLoadedDiagnostic.h
+++ b/clang/tools/libclang/CXLoadedDiagnostic.h
@@ -71,11 +71,11 @@ class CXLoadedDiagnostic : public CXDiagnosticImpl {
 
   struct Location {
     CXFile file;
-    unsigned line;
-    unsigned column;
-    unsigned offset;
+    unsigned line = 0;
+    unsigned column = 0;
+    unsigned offset = 0;
     
-    Location() : line(0), column(0), offset(0) {}    
+    Location() = default;
   };
   
   Location DiagLoc;


        


More information about the cfe-commits mailing list