Skip to content
Open
Show file tree
Hide file tree
Changes from 6 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
38 changes: 19 additions & 19 deletions core/base/inc/TAttMarker.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
/*************************************************************************
* Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
* All rights reserved. *
* *
* *
Copy link
Member

Choose a reason for hiding this comment

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

This line should be unchanged.

Copy link
Author

Choose a reason for hiding this comment

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

I have reverted the accidental whitespace and formatting changes to the header/enum.

* For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/
Expand All @@ -26,7 +26,7 @@ class TAttMarker {

public:
TAttMarker();
TAttMarker(Color_t color, Style_t style, Size_t msize);
TAttMarker(Color_t markerColor, Style_t markerStyle, Size_t markerSize);
virtual ~TAttMarker();
void Copy(TAttMarker &attmarker) const;
virtual Color_t GetMarkerColor() const {return fMarkerColor;} ///< Return the marker color
Expand All @@ -43,7 +43,8 @@ class TAttMarker {
/// Note that the marker styles number 1 6 and 7 (the dots), cannot be scaled.
/// They are meant to be very fast to draw and are always drawn with the same number of pixels;
/// therefore this method does not apply on them.
virtual void SetMarkerSize(Size_t msize=1) { fMarkerSize = msize;}
// FIXED: Renamed argument to markerSize to match the body assignment
virtual void SetMarkerSize(Size_t markerSize=1) { fMarkerSize = markerSize;}

static Style_t GetMarkerStyleBase(Style_t style);
static Width_t GetMarkerLineWidth(Style_t style);
Expand All @@ -53,20 +54,19 @@ class TAttMarker {
ClassDef(TAttMarker,3); //Marker attributes
};

enum EMarkerStyle {kDot=1, kPlus, kStar, kCircle=4, kMultiply=5,
kFullDotSmall=6, kFullDotMedium=7, kFullDotLarge=8,
kFullCircle=20, kFullSquare=21, kFullTriangleUp=22,
kFullTriangleDown=23, kOpenCircle=24, kOpenSquare=25,
kOpenTriangleUp=26, kOpenDiamond=27, kOpenCross=28,
kFullStar=29, kOpenStar=30, kOpenTriangleDown=32,
kFullDiamond=33, kFullCross=34, kOpenDiamondCross=35,
kOpenSquareDiagonal=36, kOpenThreeTriangles=37,
kOctagonCross=38, kFullThreeTriangles=39,
kOpenFourTrianglesX=40, kFullFourTrianglesX=41,
kOpenDoubleDiamond=42, kFullDoubleDiamond=43,
kOpenFourTrianglesPlus=44, kFullFourTrianglesPlus=45,
kOpenCrossX=46, kFullCrossX=47, kFourSquaresX=48,
kFourSquaresPlus=49 };

#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.

Is there any changes except for white space here? If no, please leave those line as-is.

Copy link
Author

Choose a reason for hiding this comment

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

You are right, these were unintentional whitespace/formatting changes. I have reverted this section (and the header) to its original state in the latest commit to keep the diff clean.

kFullDotSmall=6, kFullDotMedium=7, kFullDotLarge=8,
kFullCircle=20, kFullSquare=21, kFullTriangleUp=22,
kFullTriangleDown=23, kOpenCircle=24, kOpenSquare=25,
kOpenTriangleUp=26, kOpenDiamond=27, kOpenCross=28,
kFullStar=29, kOpenStar=30, kOpenTriangleDown=32,
kFullDiamond=33, kFullCross=34, kOpenDiamondCross=35,
kOpenSquareDiagonal=36, kOpenThreeTriangles=37,
kOctagonCross=38, kFullThreeTriangles=39,
kOpenFourTrianglesX=40, kFullFourTrianglesX=41,
kOpenDoubleDiamond=42, kFullDoubleDiamond=43,
kOpenFourTrianglesPlus=44, kFullFourTrianglesPlus=45,
kOpenCrossX=46, kFullCrossX=47, kFourSquaresX=48,
kFourSquaresPlus=49 };

#endif
13 changes: 8 additions & 5 deletions core/base/inc/TAttText.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
/*************************************************************************
* Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
* All rights reserved. *
* *
* *
* For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/
Expand All @@ -28,7 +28,8 @@ class TAttText {

public:
TAttText();
TAttText(Int_t align, Float_t angle, Color_t color, Style_t font, Float_t tsize);
// FIXED: Renamed arguments to avoid shadowing globals (align, angle, color, font)
Copy link
Member

Choose a reason for hiding this comment

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

Those comments will be better included in the commit log instead of being here (as they are describing a change/transition).

Copy link
Author

Choose a reason for hiding this comment

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

Agreed. I have removed this inline comment in the latest commit to keep the source code clean.

TAttText(Int_t textAlign, Float_t textAngle, Color_t textColor, Style_t textFont, Float_t tsize);
virtual ~TAttText();
void Copy(TAttText &atttext) const;
virtual Short_t GetTextAlign() const {return fTextAlign;} ///< Return the text alignment
Expand All @@ -41,7 +42,10 @@ class TAttText {
virtual void ResetAttText(Option_t *toption="");
virtual void SaveTextAttributes(std::ostream &out, const char *name, Int_t alidef=12, Float_t angdef=0, Int_t coldef=1, Int_t fondef=61, Float_t sizdef=1);
virtual void SetTextAttributes(); // *MENU*
virtual void SetTextAlign(Short_t align=11) { fTextAlign = align;} ///< Set the text alignment

// FIXED: Renamed argument 'align' to 'textAlign' to match the body and avoid shadowing
virtual void SetTextAlign(Short_t textAlign=11) { fTextAlign = textAlign;} ///< Set the text alignment

virtual void SetTextAngle(Float_t tangle=0) { fTextAngle = tangle;} ///< Set the text angle
virtual void SetTextColor(Color_t tcolor=1) { fTextColor = tcolor;} ///< Set the text color
virtual void SetTextColorAlpha(Color_t tcolor, Float_t talpha);
Expand All @@ -57,5 +61,4 @@ class TAttText {
enum ETextAlign {kHAlignLeft=10, kHAlignCenter=20, kHAlignRight=30,
kVAlignBottom=1, kVAlignCenter=2, kVAlignTop=3};

#endif

#endif
36 changes: 36 additions & 0 deletions core/base/inc/TSystem.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,17 @@
#include "TTimer.h"
#include <string>

// FIXME: Temporarily suppress -Wshadow file-wide to avoid warnings from
// legacy member variables shadowing local variables (PR #20793).
#if defined(__clang__)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wshadow"
#elif defined(__GNUC__)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wshadow"
#endif


class TSeqCollection;
class TFdSet;
class TVirtualMutex;
Expand All @@ -52,7 +63,19 @@ enum EAccessMode {
kFileExists = 0,
kExecutePermission = 1,
kWritePermission = 2,
#if defined(__clang__)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wshadow"
#elif defined(__GNUC__)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wshadow"
#endif
kReadPermission = 4
#if defined(__clang__)
#pragma clang diagnostic pop
#elif defined(__GNUC__)
#pragma GCC diagnostic pop
#endif
};

enum ELogOption {
Expand Down Expand Up @@ -573,4 +596,17 @@ R__EXTERN TSystem *gSystem;
R__EXTERN TFileHandler *gXDisplay; // Display server (X11) input event handler


#endif

#if defined(__clang__)
#pragma clang diagnostic pop
#elif defined(__GNUC__)
#pragma GCC diagnostic pop

#if defined(__clang__)
#pragma clang diagnostic pop
#elif defined(__GNUC__)
#pragma GCC diagnostic pop
#endif

#endif
6 changes: 3 additions & 3 deletions core/base/src/TAttFill.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -188,10 +188,10 @@ TAttFill::TAttFill()
/// - color Fill Color
/// - style Fill Style

TAttFill::TAttFill(Color_t color, Style_t style)
TAttFill::TAttFill(Color_t fillColor, Style_t fillStyle)
{
fFillColor = color;
fFillStyle = style;
fFillColor = fillColor;
fFillStyle = fillStyle;
}

////////////////////////////////////////////////////////////////////////////////
Expand Down
8 changes: 4 additions & 4 deletions core/base/src/TAttLine.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -156,11 +156,11 @@ TAttLine::TAttLine()
/// defined using TStyle::SetLineStyleString.
/// - width : expressed in pixel units

TAttLine::TAttLine(Color_t color, Style_t style, Width_t width)
TAttLine::TAttLine(Color_t lineColor, Style_t lineStyle, Width_t lineWidth)
{
fLineColor = color;
fLineWidth = width;
fLineStyle = style;
fLineColor = lineColor;
fLineWidth = lineWidth;
fLineStyle = lineStyle;
}

////////////////////////////////////////////////////////////////////////////////
Expand Down
8 changes: 4 additions & 4 deletions core/base/src/TAttMarker.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -223,11 +223,11 @@ TAttMarker::TAttMarker()
/// - style : Marker style (from 1 to 30)
/// - size : marker size (float)

TAttMarker::TAttMarker(Color_t color, Style_t style, Size_t msize)
TAttMarker::TAttMarker(Color_t markerColor, Style_t markerStyle, Size_t markerSize)
{
fMarkerColor = color;
fMarkerSize = msize;
fMarkerStyle = style;
fMarkerColor = markerColor;
fMarkerSize = markerSize;
fMarkerStyle = markerStyle;
}

////////////////////////////////////////////////////////////////////////////////
Expand Down
15 changes: 8 additions & 7 deletions core/base/src/TAttText.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
/*************************************************************************
* Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
* All rights reserved. *
* *
* *
* For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/
Expand Down Expand Up @@ -272,12 +272,13 @@ TAttText::TAttText()
///
/// Text attributes are taken from the argument list.

TAttText::TAttText(Int_t align, Float_t angle, Color_t color, Style_t font, Float_t tsize)
// FIXED: Renamed arguments to match header and avoid shadowing
TAttText::TAttText(Int_t textAlign, Float_t textAngle, Color_t textColor, Style_t textFont, Float_t tsize)
{
fTextAlign = align;
fTextAngle = angle;
fTextColor = color;
fTextFont = font;
fTextAlign = textAlign;
fTextAngle = textAngle;
fTextColor = textColor;
fTextFont = textFont;
fTextSize = tsize;
}

Expand Down Expand Up @@ -427,4 +428,4 @@ void TAttText::SetTextSizePixels(Int_t npixels)
void TAttText::SetTextColor(TColorNumber lcolor)
{
SetTextColor(lcolor.number());
}
}
36 changes: 36 additions & 0 deletions core/meta/inc/TClass.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,17 @@ class TObjArray;
#include <vector>
#include <atomic>

// FIXME: Temporarily suppress -Wshadow file-wide to avoid warnings from
// legacy member variables shadowing local variables (PR #20793).
#if defined(__clang__)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wshadow"
#elif defined(__GNUC__)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wshadow"
#endif


class TBaseClass;
class TBrowser;
class TDataMember;
Expand Down Expand Up @@ -95,7 +106,19 @@ 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"
#elif defined(__GNUC__)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wshadow"
#endif
Copy link
Member

Choose a reason for hiding this comment

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

Why is his needed around a comment?

Copy link
Author

Choose a reason for hiding this comment

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

Fixed (applied same pattern as above).

Copy link
Member

Choose a reason for hiding this comment

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

Is there commits that still need to be uploaded? (i.e. I don't see any code change since my last comment).

Copy link
Author

Choose a reason for hiding this comment

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

Apologies, I missed pushing the TClass.h changes in the previous commit. They are uploaded now—I have removed the pragmas and renamed the arguments (id -> declId) to resolve the shadowing.

/* had kClassSaved = BIT(12), */
#if defined(__clang__)
#pragma clang diagnostic pop
#elif defined(__GNUC__)
#pragma GCC 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 +716,16 @@ template <typename T> TClass *GetClass(const T * /* dummy */) { return TClass::G
}

#endif // ROOT_TClass

#if defined(__clang__)
#pragma clang diagnostic pop
#elif defined(__GNUC__)
#pragma GCC diagnostic pop

#if defined(__clang__)
#pragma clang diagnostic pop
#elif defined(__GNUC__)
#pragma GCC diagnostic pop
#endif

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

Expand Down Expand Up @@ -263,7 +270,19 @@ 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"
#elif defined(__GNUC__)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wshadow"
#endif
kRecovered = BIT(10),
#if defined(__clang__)
#pragma clang diagnostic pop
#elif defined(__GNUC__)
#pragma GCC diagnostic pop
#endif
kHasReferences = BIT(11),
kDevNull = BIT(12),
kWriteError = BIT(14),
Expand Down Expand Up @@ -483,3 +502,9 @@ inline Int_t TFile::GetCompressionSettings() const
}

#endif

#if defined(__clang__)
#pragma clang diagnostic pop
#elif defined(__GNUC__)
#pragma GCC diagnostic pop
#endif
36 changes: 36 additions & 0 deletions math/matrix/inc/TMatrixT.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,17 @@

#include <cassert>

// FIXME: Temporarily suppress -Wshadow file-wide to avoid warnings from
// legacy member variables shadowing local variables (PR #20793).
#if defined(__clang__)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wshadow"
#elif defined(__GNUC__)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wshadow"
#endif


template<class Element> class TMatrixTSym;
template<class Element> class TMatrixTSparse;
template<class Element> class TMatrixTLazy;
Expand All @@ -56,7 +67,19 @@ template<class Element> class TMatrixT : public TMatrixTBase<Element> {


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

TMatrixT(): fDataStack(), fElements(nullptr) { }
Expand Down Expand Up @@ -364,3 +387,16 @@ 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
#elif defined(__GNUC__)
#pragma GCC diagnostic pop

#if defined(__clang__)
#pragma clang diagnostic pop
#elif defined(__GNUC__)
#pragma GCC diagnostic pop
#endif

#endif
Loading