Skip to content
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
34a0eee
Fix: Suppress -Wshadow warnings in headers on macOS (Fixes #20790)
Jan 2, 2026
d6666b8
Style: Remove extra newline before footer to satisfy clang-format
Jan 3, 2026
aefdf3f
Refactor: Narrow scope of -Wshadow suppression to specific enums in 9…
Jan 4, 2026
4698a8c
Revert 4 files to original upstream state
Jan 5, 2026
b412441
Refactor: Add GCC support for -Wshadow suppression
Jan 5, 2026
691cdf1
Rename constructor arguments to resolve shadowing and remove pragma s…
Jan 9, 2026
4442723
Style cleanup: Fix TClass shadowing, revert TAttMarker whitespace, re…
Jan 9, 2026
696a0d1
Update core/base/inc/TAttMarker.h
aryansri05 Jan 9, 2026
c498219
Style cleanup: Fix copyright header formatting in TClass and TAttText
Jan 9, 2026
7d9de29
Update core/base/inc/TAttMarker.h
aryansri05 Jan 9, 2026
69b37d7
Update core/base/inc/TAttMarker.h
aryansri05 Jan 9, 2026
b1debb2
Update core/base/inc/TAttMarker.h
aryansri05 Jan 9, 2026
35b15a4
Update core/base/inc/TAttMarker.h
aryansri05 Jan 9, 2026
c6d8bf3
Update core/base/inc/TAttMarker.h
aryansri05 Jan 9, 2026
18dd104
Update core/base/inc/TAttText.h
aryansri05 Jan 9, 2026
6fe8064
Update core/base/inc/TAttText.h
aryansri05 Jan 9, 2026
e24d74e
Update core/base/inc/TSystem.h
aryansri05 Jan 9, 2026
5075119
Update core/base/inc/TSystem.h
aryansri05 Jan 9, 2026
3c355c2
Update core/base/inc/TAttMarker.h
aryansri05 Jan 9, 2026
bad85c0
Update core/base/inc/TAttMarker.h
aryansri05 Jan 9, 2026
f56079d
Update core/base/src/TAttText.cxx
aryansri05 Jan 9, 2026
3f3d0c9
Update core/base/src/TAttText.cxx
aryansri05 Jan 9, 2026
eac1c2b
Update io/io/inc/TFile.h
aryansri05 Jan 9, 2026
761e5cb
Update math/matrix/inc/TMatrixTSparse.h
aryansri05 Jan 9, 2026
9da9c3d
Update tree/tree/inc/TBranch.h
aryansri05 Jan 9, 2026
424b7b6
Update core/base/inc/TAttMarker.h
aryansri05 Jan 9, 2026
0e3588e
Update math/matrix/inc/TMatrixT.h
aryansri05 Jan 9, 2026
32f720e
Update math/matrix/inc/TMatrixT.h
aryansri05 Jan 9, 2026
de93436
Update math/matrix/inc/TMatrixTSparse.h
aryansri05 Jan 9, 2026
1c0fea7
Update math/matrix/inc/TMatrixTSym.h
aryansri05 Jan 9, 2026
de39f84
Update tree/tree/inc/TBranch.h
aryansri05 Jan 9, 2026
dc749f6
Update math/matrix/inc/TMatrixTSym.h
aryansri05 Jan 9, 2026
d8ca856
Update core/base/src/TAttText.cxx
aryansri05 Jan 9, 2026
c743796
Update core/meta/inc/TClass.h
aryansri05 Jan 9, 2026
2271329
Update core/meta/inc/TClass.h
aryansri05 Jan 9, 2026
f553e4a
Update core/meta/inc/TClass.h
aryansri05 Jan 9, 2026
5031a21
Update io/io/inc/TFile.h
aryansri05 Jan 9, 2026
206ad50
Update core/base/inc/TAttMarker.h
aryansri05 Jan 9, 2026
dad1300
Update core/base/inc/TAttMarker.h
aryansri05 Jan 9, 2026
cbdd1d8
Update core/base/inc/TAttMarker.h
aryansri05 Jan 9, 2026
7756fce
Update core/base/inc/TAttMarker.h
aryansri05 Jan 10, 2026
1aaf392
Update core/base/inc/TAttMarker.h
aryansri05 Jan 10, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions core/base/inc/TApplication.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
#if defined(__clang__)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wshadow"
#endif
// @(#)root/base:$Id$
// Author: Fons Rademakers 22/12/95

Expand Down Expand Up @@ -170,3 +174,7 @@ class TApplication : public TObject, public TQObject {
R__EXTERN TApplication *gApplication;

#endif

#if defined(__clang__)
#pragma clang diagnostic pop
#endif
14 changes: 14 additions & 0 deletions core/base/inc/TAttMarker.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
#if defined(__clang__)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wshadow"
#endif
// @(#)root/base:$Id$
// Author: Rene Brun 12/05/95

Expand Down Expand Up @@ -53,7 +57,14 @@ class TAttMarker {
ClassDef(TAttMarker,3); //Marker attributes
};

#if defined(__clang__)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wshadow"
#endif
enum EMarkerStyle {kDot=1, kPlus, kStar, kCircle=4, kMultiply=5,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please document exactly which of the enums constant are the one shadowing existing symbols and list/refer where the shadowed symbols comes from (if known).

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The suppression was intended for the TAttMarker constructor arguments (color and style), not these enums. However, since we established that renaming the arguments is safe, this suppression block is no longer necessary. I will remove it and rename the arguments in the next update

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is puzzling since you put these guard specifically around this lines and thus it must/might have been related to one of the symbol on that line, isn't it?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The point was to activate the suppression for the entire class scope. Since the compiler processes the file sequentially, the directive must be placed before the inline constructor definition. Placing it at the start of the class guarantees the constructor is covered; the enum just happens to be the first declaration in that scope.

#if defined(__clang__)
#pragma clang diagnostic pop
#endif
kFullDotSmall=6, kFullDotMedium=7, kFullDotLarge=8,
kFullCircle=20, kFullSquare=21, kFullTriangleUp=22,
kFullTriangleDown=23, kOpenCircle=24, kOpenSquare=25,
Expand All @@ -70,3 +81,6 @@ class TAttMarker {

#endif

#if defined(__clang__)
#pragma clang diagnostic pop
#endif
15 changes: 15 additions & 0 deletions core/base/inc/TSystem.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
#if defined(__clang__)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wshadow"
#endif
// @(#)root/base:$Id$
// Author: Fons Rademakers 15/09/95

Expand Down Expand Up @@ -52,7 +56,14 @@ enum EAccessMode {
kFileExists = 0,
kExecutePermission = 1,
kWritePermission = 2,
#if defined(__clang__)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wshadow"
#endif
kReadPermission = 4
#if defined(__clang__)
#pragma clang diagnostic pop
#endif
};

enum ELogOption {
Expand Down Expand Up @@ -574,3 +585,7 @@ R__EXTERN TFileHandler *gXDisplay; // Display server (X11) input event handler


#endif

#if defined(__clang__)
#pragma clang diagnostic pop
#endif
8 changes: 8 additions & 0 deletions core/base/inc/TVirtualX.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
#if defined(__clang__)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wshadow"
#endif
// @(#)root/base:$Id$
// Author: Fons Rademakers 3/12/95

Expand Down Expand Up @@ -339,3 +343,7 @@ R__EXTERN TVirtualX *(*gPtr2VirtualX)();
R__EXTERN TVirtualX *gGXBatch;

#endif

#if defined(__clang__)
#pragma clang diagnostic pop
#endif
15 changes: 15 additions & 0 deletions core/meta/inc/TClass.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
#if defined(__clang__)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wshadow"
#endif
// @(#)root/meta:$Id$
// Author: Rene Brun 07/01/95

Expand Down Expand Up @@ -95,7 +99,14 @@ friend class TStreamerInfo;
enum EStatusBits {
kReservedLoading = BIT(7), // Internal status bits, set and reset only during initialization

#if defined(__clang__)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wshadow"
#endif
/* had kClassSaved = BIT(12), */
#if defined(__clang__)
#pragma clang diagnostic pop
#endif
kHasLocalHashMember = BIT(14),
kIgnoreTObjectStreamer = BIT(15),
kUnloaded = BIT(16), // The library containing the dictionary for this class was
Expand Down Expand Up @@ -693,3 +704,7 @@ template <typename T> TClass *GetClass(const T * /* dummy */) { return TClass::G
}

#endif // ROOT_TClass

#if defined(__clang__)
#pragma clang diagnostic pop
#endif
15 changes: 15 additions & 0 deletions core/meta/inc/TInterpreter.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
#if defined(__clang__)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wshadow"
#endif
// @(#)root/meta:$Id$
// Author: Fons Rademakers 01/03/96

Expand Down Expand Up @@ -70,7 +74,14 @@ class TInterpreter : public TNamed {
typedef class std::map<std::string, std::string> MembersMap_t;

enum EErrorCode {
#if defined(__clang__)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wshadow"
#endif
kNoError = 0,
#if defined(__clang__)
#pragma clang diagnostic pop
#endif
kRecoverable = 1,
kDangerous = 2,
kFatal = 3,
Expand Down Expand Up @@ -584,3 +595,7 @@ inline ROOT::Internal::InterpreterMutexRegistrationRAII::~InterpreterMutexRegist
}

#endif

#if defined(__clang__)
#pragma clang diagnostic pop
#endif
8 changes: 8 additions & 0 deletions gui/gui/inc/TGFrame.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
#if defined(__clang__)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wshadow"
#endif
// @(#)root/gui:$Id$
// Author: Fons Rademakers 03/01/98

Expand Down Expand Up @@ -609,3 +613,7 @@ class TGHeaderFrame : public TGHorizontalFrame {


#endif

#if defined(__clang__)
#pragma clang diagnostic pop
#endif
15 changes: 15 additions & 0 deletions io/io/inc/TFile.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
#if defined(__clang__)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wshadow"
#endif
// @(#)root/io:$Id$
// Author: Rene Brun 28/11/94

Expand Down Expand Up @@ -263,7 +267,14 @@ class TFile : public TDirectoryFile {
// Note that to avoid a circular dependency, this value is used
// hard coded in TObject.cxx.
k630forwardCompatibility = BIT(2),
#if defined(__clang__)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wshadow"
#endif
kRecovered = BIT(10),
#if defined(__clang__)
#pragma clang diagnostic pop
#endif
kHasReferences = BIT(11),
kDevNull = BIT(12),
kWriteError = BIT(14),
Expand Down Expand Up @@ -483,3 +494,7 @@ inline Int_t TFile::GetCompressionSettings() const
}

#endif

#if defined(__clang__)
#pragma clang diagnostic pop
#endif
15 changes: 15 additions & 0 deletions math/matrix/inc/TMatrixT.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
#if defined(__clang__)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wshadow"
#endif
// @(#)root/matrix:$Id$
// Authors: Fons Rademakers, Eddy Offermann Nov 2003

Expand Down Expand Up @@ -56,7 +60,14 @@ template<class Element> class TMatrixT : public TMatrixTBase<Element> {


enum {kWorkMax = 100};
#if defined(__clang__)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wshadow"
#endif
enum EMatrixCreatorsOp1 { kZero,kUnit,kTransposed,kInverted,kAtA };
#if defined(__clang__)
#pragma clang diagnostic pop
#endif
enum EMatrixCreatorsOp2 { kMult,kTransposeMult,kInvMult,kMultTranspose,kPlus,kMinus };

TMatrixT(): fDataStack(), fElements(nullptr) { }
Expand Down Expand Up @@ -364,3 +375,7 @@ template <class Element> void AMultBt(const Element * const ap,Int_t na,Int_t nc
const Element * const bp,Int_t nb,Int_t ncolsb,Element *cp);
} // inline namespace TMatrixTAutoloadOps
#endif

#if defined(__clang__)
#pragma clang diagnostic pop
#endif
15 changes: 15 additions & 0 deletions math/matrix/inc/TMatrixTSparse.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
#if defined(__clang__)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wshadow"
#endif
// @(#)root/matrix:$Id$
// Authors: Fons Rademakers, Eddy Offermann Feb 2004

Expand Down Expand Up @@ -77,7 +81,14 @@ template<class Element> class TMatrixTSparse : public TMatrixTBase<Element> {

public:

#if defined(__clang__)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wshadow"
#endif
enum EMatrixCreatorsOp1 { kZero,kUnit,kTransposed,kAtA };
#if defined(__clang__)
#pragma clang diagnostic pop
#endif
enum EMatrixCreatorsOp2 { kMult,kMultTranspose,kPlus,kMinus };

TMatrixTSparse() { fElements = nullptr; fRowIndex = nullptr; fColIndex = nullptr; }
Expand Down Expand Up @@ -285,3 +296,7 @@ template <class Element> TMatrixTSparse<Element> &ElementDiv (TMatrixTSparse<Ele
template <class Element> Bool_t AreCompatible(const TMatrixTSparse<Element> &m1,const TMatrixTSparse<Element> &m2,Int_t verbose=0);

#endif

#if defined(__clang__)
#pragma clang diagnostic pop
#endif
15 changes: 15 additions & 0 deletions math/matrix/inc/TMatrixTSym.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
#if defined(__clang__)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wshadow"
#endif
// @(#)root/matrix:$Id$
// Authors: Fons Rademakers, Eddy Offermann Nov 2003

Expand Down Expand Up @@ -50,7 +54,14 @@ template<class Element> class TMatrixTSym : public TMatrixTBase<Element> {
public:

enum {kWorkMax = 100}; // size of work array
#if defined(__clang__)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wshadow"
#endif
enum EMatrixCreatorsOp1 { kZero,kUnit,kTransposed,kInverted,kAtA };
#if defined(__clang__)
#pragma clang diagnostic pop
#endif
enum EMatrixCreatorsOp2 { kPlus,kMinus };

TMatrixTSym() { fElements = nullptr; }
Expand Down Expand Up @@ -283,3 +294,7 @@ template <class Element> TMatrixTSym<Element> &ElementMult(TMatrixTSym<Element>
template <class Element> TMatrixTSym<Element> &ElementDiv (TMatrixTSym<Element> &target,const TMatrixTSym<Element> &source);

#endif

#if defined(__clang__)
#pragma clang diagnostic pop
#endif
8 changes: 8 additions & 0 deletions net/net/inc/TSocket.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
#if defined(__clang__)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wshadow"
#endif
// @(#)root/net:$Id$
// Author: Fons Rademakers 18/12/96

Expand Down Expand Up @@ -188,3 +192,7 @@ inline Int_t TSocket::GetCompressionSettings() const
}

#endif

#if defined(__clang__)
#pragma clang diagnostic pop
#endif
15 changes: 15 additions & 0 deletions tree/tree/inc/TBranch.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
#if defined(__clang__)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wshadow"
#endif
// @(#)root/tree:$Id$
// Author: Rene Brun 12/01/96

Expand Down Expand Up @@ -56,7 +60,14 @@ class TBranchIMTHelper; ///< A helper class for managing IMT work during TTree:F
const Int_t kDoNotProcess = BIT(10); // Active bit for branches
const Int_t kIsClone = BIT(11); // to indicate a TBranchClones
const Int_t kBranchObject = BIT(12); // branch is a TObject*
#if defined(__clang__)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wshadow"
#endif
const Int_t kBranchAny = BIT(17); // branch is an object*
#if defined(__clang__)
#pragma clang diagnostic pop
#endif
const Int_t kMapObject = kBranchObject | kBranchAny;

namespace ROOT {
Expand Down Expand Up @@ -328,3 +339,7 @@ inline bool TBulkBranchRead::SupportsBulkRead() const { return fParent.Support
} // ROOT

#endif

#if defined(__clang__)
#pragma clang diagnostic pop
#endif