[PATCH] D49986: [ADT] ImmutableList::add parameters are switched

2018-08-28 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus abandoned this revision.
Szelethus added a comment.

In https://reviews.llvm.org/D49986#1192798, @Szelethus wrote:

> In https://reviews.llvm.org/D49985#1181568, @NoQ wrote:
>
> > In https://reviews.llvm.org/D49985#1181564, @dblaikie wrote:
> >
> > > It looks like concat orders the arguments in the same way that the output 
> > > would be (so concat(X, list) produces [X, list]) - so preserving that 
> > > argument order seems like it improves/retains readability compared to 
> > > switching them around so 'concat(list, X)' produces '[X, list]'.
> >
> >
> > Yeah, i guess that might have been the motivation behind such 
> > inconsistency. I'll be fine with fixing the order for other data structures.
>
>
> @NoQ Have your views changed about this patch? Shall I abandon it?


I've decided to do so after https://reviews.llvm.org/rL340824.


Repository:
  rC Clang

https://reviews.llvm.org/D49986



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D49986: [ADT] ImmutableList::add parameters are switched

2018-08-08 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus added a subscriber: dblaikie.
Szelethus added a comment.

In https://reviews.llvm.org/D49985#1181568, @NoQ wrote:

> In https://reviews.llvm.org/D49985#1181564, @dblaikie wrote:
>
> > It looks like concat orders the arguments in the same way that the output 
> > would be (so concat(X, list) produces [X, list]) - so preserving that 
> > argument order seems like it improves/retains readability compared to 
> > switching them around so 'concat(list, X)' produces '[X, list]'.
>
>
> Yeah, i guess that might have been the motivation behind such inconsistency. 
> I'll be fine with fixing the order for other data structures.


@NoQ Have your views changed about this patch? Shall I abandon it?


Repository:
  rC Clang

https://reviews.llvm.org/D49986



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D49986: [ADT] ImmutableList::add parameters are switched

2018-07-30 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ accepted this revision.
NoQ added a comment.
This revision is now accepted and ready to land.

Cool! Always bothered me.

In https://reviews.llvm.org/D49986#1180403, @george.karpenkov wrote:

> I'm a bit confused: does it mean these methods are never called in Clang?


This patch *is* for clang.


Repository:
  rC Clang

https://reviews.llvm.org/D49986



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D49986: [ADT] ImmutableList::add parameters are switched

2018-07-30 Thread George Karpenkov via Phabricator via cfe-commits
george.karpenkov added a comment.

I'm a bit confused: does it mean these methods are never called in Clang?


Repository:
  rC Clang

https://reviews.llvm.org/D49986



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D49986: [ADT] ImmutableList::add parameters are switched

2018-07-30 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus created this revision.
Szelethus added reviewers: NoQ, george.karpenkov, dcoughlin, chandlerc.
Herald added a subscriber: cfe-commits.

Clang side changes, see https://reviews.llvm.org/D49985.


Repository:
  rC Clang

https://reviews.llvm.org/D49986

Files:
  include/clang/StaticAnalyzer/Core/PathSensitive/BasicValueFactory.h
  include/clang/StaticAnalyzer/Core/PathSensitive/ProgramStateTrait.h


Index: include/clang/StaticAnalyzer/Core/PathSensitive/ProgramStateTrait.h
===
--- include/clang/StaticAnalyzer/Core/PathSensitive/ProgramStateTrait.h
+++ include/clang/StaticAnalyzer/Core/PathSensitive/ProgramStateTrait.h
@@ -153,7 +153,7 @@
 using context_type = typename data_type::Factory &;
 
 static data_type Add(data_type L, key_type K, context_type F) {
-  return F.add(L, K);
+  return F.add(K, L);
 }
 
 static bool Contains(data_type L, key_type K) {
Index: include/clang/StaticAnalyzer/Core/PathSensitive/BasicValueFactory.h
===
--- include/clang/StaticAnalyzer/Core/PathSensitive/BasicValueFactory.h
+++ include/clang/StaticAnalyzer/Core/PathSensitive/BasicValueFactory.h
@@ -233,7 +233,7 @@
   }
 
   llvm::ImmutableList prependSVal(SVal X, llvm::ImmutableList L) {
-return SValListFactory.add(L, X);
+return SValListFactory.add(X, L);
   }
 
   llvm::ImmutableList getEmptyCXXBaseList() {
@@ -243,7 +243,7 @@
   llvm::ImmutableList prependCXXBase(
   const CXXBaseSpecifier *CBS,
   llvm::ImmutableList L) {
-return CXXBaseListFactory.add(L, CBS);
+return CXXBaseListFactory.add(CBS, L);
   }
 
   const PointerToMemberData *accumCXXBase(


Index: include/clang/StaticAnalyzer/Core/PathSensitive/ProgramStateTrait.h
===
--- include/clang/StaticAnalyzer/Core/PathSensitive/ProgramStateTrait.h
+++ include/clang/StaticAnalyzer/Core/PathSensitive/ProgramStateTrait.h
@@ -153,7 +153,7 @@
 using context_type = typename data_type::Factory &;
 
 static data_type Add(data_type L, key_type K, context_type F) {
-  return F.add(L, K);
+  return F.add(K, L);
 }
 
 static bool Contains(data_type L, key_type K) {
Index: include/clang/StaticAnalyzer/Core/PathSensitive/BasicValueFactory.h
===
--- include/clang/StaticAnalyzer/Core/PathSensitive/BasicValueFactory.h
+++ include/clang/StaticAnalyzer/Core/PathSensitive/BasicValueFactory.h
@@ -233,7 +233,7 @@
   }
 
   llvm::ImmutableList prependSVal(SVal X, llvm::ImmutableList L) {
-return SValListFactory.add(L, X);
+return SValListFactory.add(X, L);
   }
 
   llvm::ImmutableList getEmptyCXXBaseList() {
@@ -243,7 +243,7 @@
   llvm::ImmutableList prependCXXBase(
   const CXXBaseSpecifier *CBS,
   llvm::ImmutableList L) {
-return CXXBaseListFactory.add(L, CBS);
+return CXXBaseListFactory.add(CBS, L);
   }
 
   const PointerToMemberData *accumCXXBase(
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits